projects
/
oweals
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d08b7f
)
file: remove redundant NULL check on return value of uci_realloc()
author
Yousong Zhou
<yszhou4tech@gmail.com>
Tue, 21 Mar 2017 03:15:12 +0000
(11:15 +0800)
committer
Felix Fietkau
<nbd@nbd.name>
Wed, 12 Apr 2017 08:54:50 +0000
(10:54 +0200)
Because the check will be done by uci_realloc itself.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
file.c
patch
|
blob
|
history
diff --git
a/file.c
b/file.c
index 5a8c6cb51bb143fe23c5e272cc0a0805ff17b0fa..494c6491cb80b68c2967cf2fc462b1004f188283 100644
(file)
--- 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);
}