diff mbox series

[for-3.2,35/41] slirp: NULL is defined by glib (at least)

Message ID 20181114123643.24091-36-marcandre.lureau@redhat.com
State New
Headers show
Series RFC: slirp: make it again a standalone project | expand

Commit Message

Marc-André Lureau Nov. 14, 2018, 12:36 p.m. UTC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 slirp/slirp.h | 4 ----
 1 file changed, 4 deletions(-)

Comments

Daniel P. Berrangé Nov. 14, 2018, 2:11 p.m. UTC | #1
NULL is defined in stddef.h for at least 15 years AFAICT, so
even glib shouldn't bother to define it :-)  So I'd suggest
changing $subject to just defer to stddef.h

On Wed, Nov 14, 2018 at 04:36:37PM +0400, Marc-André Lureau wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  slirp/slirp.h | 4 ----
>  1 file changed, 4 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

> 
> diff --git a/slirp/slirp.h b/slirp/slirp.h
> index 4356b2f427..2a61a85995 100644
> --- a/slirp/slirp.h
> +++ b/slirp/slirp.h
> @@ -199,10 +199,6 @@ struct Slirp {
>      void *opaque;
>  };
>  
> -#ifndef NULL
> -#define NULL (void *)0
> -#endif
> -
>  void if_start(Slirp *);
>  
>  int get_dns_addr(struct in_addr *pdns_addr);
> -- 
> 2.19.1.708.g4ede3d42df
> 
> 

Regards,
Daniel
Samuel Thibault Nov. 20, 2018, 1:33 a.m. UTC | #2
Daniel P. Berrangé, le mer. 14 nov. 2018 14:11:34 +0000, a ecrit:
> NULL is defined in stddef.h for at least 15 years AFAICT, so
> even glib shouldn't bother to define it :-)  So I'd suggest
> changing $subject to just defer to stddef.h
> 
> On Wed, Nov 14, 2018 at 04:36:37PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  slirp/slirp.h | 4 ----
> >  1 file changed, 4 deletions(-)
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Applied to my tree, thanks!
diff mbox series

Patch

diff --git a/slirp/slirp.h b/slirp/slirp.h
index 4356b2f427..2a61a85995 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -199,10 +199,6 @@  struct Slirp {
     void *opaque;
 };
 
-#ifndef NULL
-#define NULL (void *)0
-#endif
-
 void if_start(Slirp *);
 
 int get_dns_addr(struct in_addr *pdns_addr);