uci: patch for static host build
[openwrt/staging/yousong.git] / package / system / uci / patches / 0002-file-remove-redundant-NULL-check-on-return-value-of-.patch
1 From 7e0f33c7b4747a2b48588cc3337b01c19c9b562d Mon Sep 17 00:00:00 2001
2 From: Yousong Zhou <yszhou4tech@gmail.com>
3 Date: Wed, 27 May 2015 10:30:42 +0800
4 Subject: [PATCH 2/3] file: remove redundant NULL check on return value of
5 uci_realloc()
6
7 Because the check will be done by uci_realloc itself.
8
9 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
10 ---
11 file.c | 2 --
12 1 file changed, 2 deletions(-)
13
14 diff --git a/file.c b/file.c
15 index 7e1e4e6..151a308 100644
16 --- a/file.c
17 +++ b/file.c
18 @@ -70,8 +70,6 @@ __private void uci_getln(struct uci_context *ctx, int offset)
19
20 pctx->bufsz *= 2;
21 pctx->buf = uci_realloc(ctx, pctx->buf, pctx->bufsz);
22 - if (!pctx->buf)
23 - UCI_THROW(ctx, UCI_ERR_MEM);
24 } while (1);
25 }
26
27 --
28 2.6.4
29