[PATCH 38/42] libbb: sparse fixes

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 19 08:55:26 EDT 2010


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 lib/libbb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/libbb.c b/lib/libbb.c
index ee91fec..4d532f6 100644
--- a/lib/libbb.c
+++ b/lib/libbb.c
@@ -29,7 +29,7 @@ char *concat_path_file(const char *path, const char *filename)
 	while (*filename == '/')
 		filename++;
 
-	str = xmalloc(strlen(path) + (lc==0 ? 1 : 0) + strlen(filename) + 1);
+	str = xmalloc(strlen(path) + (lc==NULL ? 1 : 0) + strlen(filename) + 1);
 	sprintf(str, "%s%s%s", path, (lc==NULL ? "/" : ""), filename);
 
 	return str;
-- 
1.7.2.3




More information about the barebox mailing list