Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2018 11:40:52 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337037 - head/stand/libsa
Message-ID:  <201808011140.w71BeqJJ000696@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Wed Aug  1 11:40:52 2018
New Revision: 337037
URL: https://svnweb.freebsd.org/changeset/base/337037

Log:
  libsa: pointer differs in signedness
  
  A small cleanup, fix the argument type and while there, replace (char *)0 with
  NULL.

Modified:
  head/stand/libsa/net.c

Modified: head/stand/libsa/net.c
==============================================================================
--- head/stand/libsa/net.c	Wed Aug  1 11:08:52 2018	(r337036)
+++ head/stand/libsa/net.c	Wed Aug  1 11:40:52 2018	(r337037)
@@ -267,7 +267,7 @@ intoa(n_long addr)
 }
 
 static char *
-number(char *s, int *n)
+number(char *s, n_long *n)
 {
 	for (*n = 0; isdigit(*s); s++)
 		*n = (*n * 10) + *s - '0';
@@ -280,7 +280,7 @@ ip_convertaddr(char *p)
 #define IP_ANYADDR	0
 	n_long addr = 0, n;
 
-	if (p == (char *)0 || *p == '\0')
+	if (p == NULL || *p == '\0')
 		return IP_ANYADDR;
 	p = number(p, &n);
 	addr |= (n << 24) & 0xff000000;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808011140.w71BeqJJ000696>