]> rtime.felk.cvut.cz Git - coffee/mt-apps.git/commitdiff
Use GCC's designated initializers to initialize structure fields
authorMichal Sojka <michal.sojka@cvut.cz>
Mon, 6 Aug 2018 11:14:34 +0000 (13:14 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 6 Aug 2018 11:14:34 +0000 (13:14 +0200)
This results in more meaningful error messages when one tries to compile
it against incompatible version of libwebsockets.

mt_server.c

index 567c3af6fe08d2dd2c53bf59aa0d27e48e09b637..f42e06dc0b2e4732ba6afc2409243017cac31efd 100644 (file)
@@ -86,23 +86,23 @@ void list_deinit(list *in)
 }
 
 static const struct lws_http_mount mount = {
-    /* .mount_next */            NULL,         /* linked-list "next" */
-    /* .mountpoint */            HTTP_MOUNTPOINT,
-    /* .origin */                HTTP_ORIGIN,  /* serve from dir */
-    /* .def */                   HTTP_DEFAULT, /* default filename */
-    /* .protocol */              NULL,
-    /* .cgienv */                NULL,
-    /* .extra_mimetypes */       NULL,
-    /* .interpret */             NULL,
-    /* .cgi_timeout */           0,
-    /* .cache_max_age */         0,
-    /* .auth_mask */             0,
-    /* .cache_reusable */        0,
-    /* .cache_revalidate */      0,
-    /* .cache_intermediaries */  0,
-    /* .origin_protocol */       LWSMPRO_FILE, /* files in a dir */
-    /* .mountpoint_len */        1,            /* char count */
-    /* .basic_auth_login_file */ NULL,
+    .mount_next =            NULL,         /* linked-list "next" */
+    .mountpoint =            HTTP_MOUNTPOINT,
+    .origin =                HTTP_ORIGIN,  /* serve from dir */
+    .def =                   HTTP_DEFAULT, /* default filename */
+    .protocol =              NULL,
+    .cgienv =                NULL,
+    .extra_mimetypes =       NULL,
+    .interpret =             NULL,
+    .cgi_timeout =           0,
+    .cache_max_age =         0,
+    .auth_mask =             0,
+    .cache_reusable =        0,
+    .cache_revalidate =      0,
+    .cache_intermediaries =  0,
+    .origin_protocol =       LWSMPRO_FILE, /* files in a dir */
+    .mountpoint_len =        1,            /* char count */
+    .basic_auth_login_file = NULL,
 };
 
 typedef struct per_vhost_data__merica_terminal {