[LEDE-DEV] [PATCH uci 2/2] file: remove redundant NULL check on return value of uci_realloc()
Yousong Zhou
yszhou4tech at gmail.com
Mon Mar 20 20:15:12 PDT 2017
Because the check will be done by uci_realloc itself.
Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
file.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/file.c b/file.c
index 5a8c6cb..494c649 100644
--- a/file.c
+++ b/file.c
@@ -70,8 +70,6 @@ __private void uci_getln(struct uci_context *ctx, int offset)
pctx->bufsz *= 2;
pctx->buf = uci_realloc(ctx, pctx->buf, pctx->bufsz);
- if (!pctx->buf)
- UCI_THROW(ctx, UCI_ERR_MEM);
} while (1);
}
--
2.6.4
More information about the Lede-dev
mailing list