lib:util: Use C99 initializer for weird_table in charset
authorAndreas Schneider <asn@samba.org>
Wed, 12 Dec 2018 20:28:14 +0000 (21:28 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:22 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/util/charset/weird.c

index 7f766417dc4833bcbceb4dd5b33fb0625a877455..79b07b022a1f1c6be74476e163afaa4c6b7424bb 100644 (file)
@@ -28,9 +28,19 @@ static struct {
        const char *to;
        int len;
 } weird_table[] = {
-       {'q', "^q^", 3},
-       {'Q', "^Q^", 3},
-       {0, NULL}
+       {
+               .from = 'q',
+               .to   = "^q^",
+               .len  = 3,
+       },
+       {
+               .from = 'Q',
+               .to   = "^Q^",
+               .len  = 3,
+       },
+       {
+               .len = 0,
+       }
 };
 
 size_t weird_pull(void *cd, const char **inbuf, size_t *inbytesleft,