[PATCH] lib: math: Return NULL pointer

Fabio Estevam festevam at gmail.com
Fri Feb 21 09:59:48 EST 2014


From: Fabio Estevam <fabio.estevam at freescale.com>

Fix the following sparse warning:

lib/math.c:309:16: warning: Using plain integer as NULL pointer

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 lib/math.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/math.c b/lib/math.c
index 2e53b09..19c8f08 100644
--- a/lib/math.c
+++ b/lib/math.c
@@ -306,7 +306,7 @@ static const char *arith_lookup_val(arith_state_t *math_state, var_or_num_t *t)
 		/* treat undefined var as 0 */
 		t->val = 0;
 	}
-	return 0;
+	return NULL;
 }
 
 /* "Applying" a token means performing it on the top elements on the integer
-- 
1.8.1.2




More information about the barebox mailing list