Skip to contentSkip to conversation

lib: math: Return NULL pointer

PATCH Applied Fabio Estevam 2 participants 2 messages Feb 21, 2014 – Feb 24, 2014 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: math: Return NULL pointer

From: Fabio Estevam <[email protected]>

Fix the following sparse warning:

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

---
 lib/math.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/math.c +1 -1
index 2e53b09..19c8f08 100644
@@ -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
Signature · 7 lines
1.8.1.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 7 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Fix the following sparse warning:

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

Applied, thanks.

Sascha

Quoted 21 lines
---
 lib/math.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/math.c +1 -1
index 2e53b09..19c8f08 100644
@@ -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
Signature · 1 line
1.8.1.2
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox