mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] lib: math: Return NULL pointer
@ 2014-02-21 14:59 Fabio Estevam
  2014-02-24  7:59 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2014-02-21 14:59 UTC (permalink / raw)
  To: s.hauer; +Cc: Fabio Estevam, barebox

From: Fabio Estevam <fabio.estevam@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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib: math: Return NULL pointer
  2014-02-21 14:59 [PATCH] lib: math: Return NULL pointer Fabio Estevam
@ 2014-02-24  7:59 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2014-02-24  7:59 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, barebox

On Fri, Feb 21, 2014 at 11:59:48AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@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@freescale.com>

Applied, thanks.

Sascha

> ---
>  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
> 
> 

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-24  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 14:59 [PATCH] lib: math: Return NULL pointer Fabio Estevam
2014-02-24  7:59 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox