From d24de9fb6b0c3aa052b04dd77c9d4de4b4a2b650 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 27 May 2012 01:00:15 +0200 Subject: [PATCH] Remove a few more casts of NULL to some pointer type. --- lib/libc/locale/iswctype.c | 5 ++--- lib/libc/xdr/xdr_sizeof.c | 3 +-- lib/libsctp/sctp_sys_calls.c | 3 +-- sbin/atm/ilmid/ilmid.c | 2 +- usr.sbin/rpcbind/rpcb_svc_com.c | 4 ++-- usr.sbin/sdpd/bgd.c | 3 +-- usr.sbin/sdpd/sd.c | 3 +-- usr.sbin/ypbind/yp_ping.c | 3 +-- 8 files changed, 10 insertions(+), 16 deletions(-) diff --git a/lib/libc/locale/iswctype.c b/lib/libc/locale/iswctype.c index f80dd3b9da..5877c8475e 100644 --- a/lib/libc/locale/iswctype.c +++ b/lib/libc/locale/iswctype.c @@ -1,5 +1,4 @@ /* $NetBSD: src/lib/libc/locale/iswctype.c,v 1.14 2003/08/07 16:43:04 agc Exp $ */ -/* $DragonFly: src/lib/libc/locale/iswctype.c,v 1.1 2005/03/16 06:54:41 joerg Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -202,7 +201,7 @@ wctrans(const char *charclass) return((wctrans_t)&rl->rl_wctrans[i]); } - return((wctrans_t)NULL); + return(NULL); } #undef towctrans @@ -227,7 +226,7 @@ wctype(const char *property) if (strcmp(rl->rl_wctype[i].te_name, property) == 0) return((wctype_t)&rl->rl_wctype[i]); } - return((wctype_t)NULL); + return(NULL); } #undef iswctype diff --git a/lib/libc/xdr/xdr_sizeof.c b/lib/libc/xdr/xdr_sizeof.c index fd8d8ed717..bb8c5b01ed 100644 --- a/lib/libc/xdr/xdr_sizeof.c +++ b/lib/libc/xdr/xdr_sizeof.c @@ -27,7 +27,6 @@ * Mountain View, California 94043 * * $FreeBSD: src/lib/libc/xdr/xdr_sizeof.c,v 1.5 2003/03/07 13:19:40 nectar Exp $ - * $DragonFly: src/lib/libc/xdr/xdr_sizeof.c,v 1.2 2005/12/05 00:47:57 swildner Exp $ */ /* @@ -146,7 +145,7 @@ xdr_sizeof(xdrproc_t func, void *data) x.x_op = XDR_ENCODE; x.x_ops = &ops; x.x_handy = 0; - x.x_private = (caddr_t) NULL; + x.x_private = NULL; x.x_base = (caddr_t) 0; stat = func(&x, data); diff --git a/lib/libsctp/sctp_sys_calls.c b/lib/libsctp/sctp_sys_calls.c index 2b5a94bb5a..eac6d3a592 100644 --- a/lib/libsctp/sctp_sys_calls.c +++ b/lib/libsctp/sctp_sys_calls.c @@ -1,5 +1,4 @@ /* $KAME: sctp_sys_calls.c,v 1.9 2004/08/17 06:08:53 itojun Exp $ */ -/* $DragonFly: src/lib/libsctp/sctp_sys_calls.c,v 1.3 2008/09/30 16:57:05 swildner Exp $ */ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -419,7 +418,7 @@ sctp_sendmsg(int s, msg.msg_name = (caddr_t)who; msg.msg_namelen = who->sa_len; } else { - msg.msg_name = (caddr_t)NULL; + msg.msg_name = NULL; msg.msg_namelen = 0; } msg.msg_iov = iov; diff --git a/sbin/atm/ilmid/ilmid.c b/sbin/atm/ilmid/ilmid.c index 6b9771f21f..43fb77cb47 100644 --- a/sbin/atm/ilmid/ilmid.c +++ b/sbin/atm/ilmid/ilmid.c @@ -351,7 +351,7 @@ write_timestamp(void) time_t clk; struct tm *tm; - clk = time ( (time_t)NULL ); + clk = time ( NULL ); tm = localtime ( &clk ); if ( Log && Debug_Level > 1 ) diff --git a/usr.sbin/rpcbind/rpcb_svc_com.c b/usr.sbin/rpcbind/rpcb_svc_com.c index 3401f08c74..fa6b5beb49 100644 --- a/usr.sbin/rpcbind/rpcb_svc_com.c +++ b/usr.sbin/rpcbind/rpcb_svc_com.c @@ -190,7 +190,7 @@ map_set(RPCB *regp, char *owner) free(rbl); return (FALSE); } - rbl->rpcb_next = (rpcblist_ptr)NULL; + rbl->rpcb_next = NULL; if (list_rbl == NULL) { list_rbl = rbl; } else { @@ -692,7 +692,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp, rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers, a.rmt_proc, transp->xp_netid, rbl); - if (rbl == (rpcblist_ptr)NULL) { + if (rbl == NULL) { #ifdef RPCBIND_DEBUG if (debugging) fprintf(stderr, "not found\n"); diff --git a/usr.sbin/sdpd/bgd.c b/usr.sbin/sdpd/bgd.c index a29734e32d..a9cc7f5915 100644 --- a/usr.sbin/sdpd/bgd.c +++ b/usr.sbin/sdpd/bgd.c @@ -1,5 +1,4 @@ /* $NetBSD: bgd.c,v 1.2 2007/11/09 20:08:40 plunky Exp $ */ -/* $DragonFly: src/usr.sbin/sdpd/bgd.c,v 1.1 2008/01/06 21:51:30 hasso Exp $ */ /* * bgd.c @@ -104,6 +103,6 @@ profile_t bgd_profile_descriptor = { bgd_profile_uuids, sizeof(bgd_profile_uuids), 0, - (profile_data_valid_p) NULL, + NULL, (attr_t const * const) &bgd_profile_attrs }; diff --git a/usr.sbin/sdpd/sd.c b/usr.sbin/sdpd/sd.c index 16fbd00b3c..d45e0e8efc 100644 --- a/usr.sbin/sdpd/sd.c +++ b/usr.sbin/sdpd/sd.c @@ -1,5 +1,4 @@ /* $NetBSD: sd.c,v 1.2 2007/11/09 20:08:41 plunky Exp $ */ -/* $DragonFly: src/usr.sbin/sdpd/sd.c,v 1.1 2008/01/06 21:51:30 hasso Exp $ */ /* * sd.c @@ -215,6 +214,6 @@ profile_t sd_profile_descriptor = { sd_profile_uuids, sizeof(sd_profile_uuids), 0, - (profile_data_valid_p) NULL, + NULL, (attr_t const * const) &sd_profile_attrs }; diff --git a/usr.sbin/ypbind/yp_ping.c b/usr.sbin/ypbind/yp_ping.c index 758aceb464..8aea1ff548 100644 --- a/usr.sbin/ypbind/yp_ping.c +++ b/usr.sbin/ypbind/yp_ping.c @@ -32,7 +32,6 @@ * @(#)from: clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro * @(#)from: clnt_udp.c 2.2 88/08/01 4.0 RPCSRC * $FreeBSD: src/usr.sbin/ypbind/yp_ping.c,v 1.17 2008/09/15 14:01:40 dfr Exp $ - * $DragonFly: src/usr.sbin/ypbind/yp_ping.c,v 1.7 2005/11/24 22:23:02 swildner Exp $ */ /* @@ -172,7 +171,7 @@ ypproc_domain_nonack_2_recv(domainname *argp, CLIENT *clnt) memset((char *)&clnt_res, 0, sizeof (clnt_res)); if (clnt_call(clnt, YPPROC_DOMAIN_NONACK, - (xdrproc_t) NULL, (caddr_t) argp, + NULL, (caddr_t) argp, (xdrproc_t) xdr_bool, (caddr_t) &clnt_res, TIMEOUT) != RPC_SUCCESS) { return (NULL); -- 2.41.0