]> pilppa.com Git - uci.git/commitdiff
fix null string test
authorFelix Fietkau <nbd@openwrt.org>
Wed, 23 Jan 2008 00:08:19 +0000 (01:08 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 23 Jan 2008 00:08:19 +0000 (01:08 +0100)
file.c

diff --git a/file.c b/file.c
index 84284627d26e31d70f2a04bbf189ccc2a2602406..da72bde380c889e6c869c809283d0706d44ba6e5 100644 (file)
--- 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);