diff options
author | darrenr <darrenr@FreeBSD.org> | 2007-10-18 21:42:51 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2007-10-18 21:42:51 +0000 |
commit | 71e82d94e82560b20789833f60056506de34de8b (patch) | |
tree | da6aaa7272c76c9c4cad931122fd1f4e4db237a5 /contrib/ipfilter/lib/alist_new.c | |
parent | e2e28d4361fc9bdb67694eedaf349bdc7ca088a3 (diff) | |
download | FreeBSD-src-71e82d94e82560b20789833f60056506de34de8b.zip FreeBSD-src-71e82d94e82560b20789833f60056506de34de8b.tar.gz |
Import IPFilter 4.1.28
Diffstat (limited to 'contrib/ipfilter/lib/alist_new.c')
-rw-r--r-- | contrib/ipfilter/lib/alist_new.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/ipfilter/lib/alist_new.c b/contrib/ipfilter/lib/alist_new.c index 72da866..50a4275 100644 --- a/contrib/ipfilter/lib/alist_new.c +++ b/contrib/ipfilter/lib/alist_new.c @@ -3,7 +3,7 @@ * * See the IPFILTER.LICENCE file for details on licencing. * - * $Id: alist_new.c,v 1.1.2.2 2006/08/25 22:43:21 darrenr Exp $ + * $Id: alist_new.c,v 1.1.2.3 2007/06/06 08:05:33 darrenr Exp $ */ #include "ipf.h" @@ -53,12 +53,14 @@ alist_new(int v, char *host) } if (gethost(host, &al->al_addr) == -1) { - *slash = '/'; + if (slash != NULL) + *slash = '/'; fprintf(stderr, "Cannot parse hostname\n"); free(al); return NULL; } al->al_mask = htonl(mask); - *slash = '/'; + if (slash != NULL) + *slash = '/'; return al; } |