Fix lots of warnings all over the place, make inbound buffers of FMOUT const.
[citadel.git] / webcit / netconf.c
index 107328a7c988cb26fe412ee8a10b5581144e1844..a62c96526e5f28800e2f4c6765f8307d0c22d71b 100644 (file)
@@ -78,8 +78,8 @@ HashList *load_netconf(StrBuf *Target, WCTemplputParams *TP)
        HashList *Hash;
        char nnn[64];
        char buf[SIZ];
-       long len;
        int nUsed;
+       long len;
        NodeConf *Node;
 
        serv_puts("CONF getsys|application/x-citadel-ignet-config");
@@ -89,7 +89,7 @@ HashList *load_netconf(StrBuf *Target, WCTemplputParams *TP)
 
                Buf = NewStrBuf();
                while ((len = StrBuf_ServGetln(Buf),
-                       strcmp(ChrPtr(Buf), "000"))) {
+                       (len != 3) || !strcmp(ChrPtr(Buf), "000"))) {
                        Node = NewNode(Buf);
                        if (Node == NULL)
                                continue;