From: Felix Fietkau Date: Wed, 23 Jan 2008 00:08:19 +0000 (+0100) Subject: fix null string test X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=054dd4e5a2bb1f74ff09c394c3a844bfa94e991d;p=oweals%2Fuci.git fix null string test --- diff --git a/file.c b/file.c index 8428462..da72bde 100644 --- a/file.c +++ b/file.c @@ -45,7 +45,7 @@ static void uci_getln(struct uci_context *ctx, int offset) p[ofs] = 0; p = fgets(p, pctx->bufsz - ofs, pctx->file); - if (!p || !p[ofs]) + if (!p || !*p) return; ofs += strlen(p);