lkml.org 
[lkml]   [2014]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] Remove dead code in util.c
Date
From: Heinrich Schuchardt <xypron.glpk@gmx.de>

xrealloc never returns null

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
util.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/util.c b/util.c
index be67836..1ce8b97 100644
--- a/util.c
+++ b/util.c
@@ -219,10 +219,6 @@ int utilfdt_read_err_len(const char *filename, char **buffp, off_t *len)
if (offset == bufsize) {
bufsize *= 2;
buf = xrealloc(buf, bufsize);
- if (!buf) {
- ret = ENOMEM;
- break;
- }
}

ret = read(fd, &buf[offset], bufsize - offset);
--
1.7.10.4


\
 
 \ /
  Last update: 2014-03-01 09:41    [W:0.053 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site