diff options
| author | 2013-01-16 00:13:23 +0000 | |
|---|---|---|
| committer | 2013-01-16 00:13:23 +0000 | |
| commit | e4a14e780f12fb69b4a2d354bab6b0dba6df5a24 (patch) | |
| tree | 466102123933949ba343d56474d39317bed5fa2b /usr.sbin/procmap/procmap.c | |
| parent | Pass struct inpcb pointer to in_pcb...() functions instead of void (diff) | |
| download | wireguard-openbsd-e4a14e780f12fb69b4a2d354bab6b0dba6df5a24.tar.xz wireguard-openbsd-e4a14e780f12fb69b4a2d354bab6b0dba6df5a24.zip | |
document a safe cast, which should be (unsigned int) instead of simply
(unsigned)
Diffstat (limited to 'usr.sbin/procmap/procmap.c')
| -rw-r--r-- | usr.sbin/procmap/procmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c index 99c3b902537..888fd2ce905 100644 --- a/usr.sbin/procmap/procmap.c +++ b/usr.sbin/procmap/procmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procmap.c,v 1.41 2012/03/09 13:02:45 ariane Exp $ */ +/* $OpenBSD: procmap.c,v 1.42 2013/01/16 00:13:23 deraadt Exp $ */ /* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */ /* @@ -983,7 +983,8 @@ cache_enter(struct namecache *ncp) ce->ce_pvp = ncp->nc_dvp; ce->ce_cid = ncp->nc_vpid; ce->ce_pcid = ncp->nc_dvpid; - ce->ce_nlen = (unsigned)ncp->nc_nlen; + /* safe since nc_nlen is maximum NCHNAMLEN */ + ce->ce_nlen = (unsigned int)ncp->nc_nlen; strlcpy(ce->ce_name, ncp->nc_name, sizeof(ce->ce_name)); LIST_INSERT_HEAD(&lcache, ce, ce_next); |
