diff options
author | dholland <dholland@NetBSD.org> | 2009-06-28 21:12:10 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-06-28 21:12:10 +0000 |
commit | fe1c4f849dd6242072352483d84870c6fcc974a7 (patch) | |
tree | 4820d4ab2d524360c820f8cda0bc55b5b8cc6c67 /hunt/hunt | |
parent | abd51ca1e4ba6bfe4680ba226df6e884b087ae00 (diff) | |
download | bsdgames-darwin-fe1c4f849dd6242072352483d84870c6fcc974a7.tar.gz bsdgames-darwin-fe1c4f849dd6242072352483d84870c6fcc974a7.tar.zst bsdgames-darwin-fe1c4f849dd6242072352483d84870c6fcc974a7.zip |
sprintf -> snprintf
Diffstat (limited to 'hunt/hunt')
-rw-r--r-- | hunt/hunt/hunt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index aecaa308..566fe40e 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.27 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: hunt.c,v 1.28 2009/06/28 21:12:10 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.27 2008/08/08 16:10:47 drochner Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.28 2009/06/28 21:12:10 dholland Exp $"); #endif /* not lint */ # include <sys/param.h> @@ -610,7 +610,8 @@ find_driver(do_startup) # endif hp = gethostbyaddr((char *) &hosts[i].sin_addr, sizeof hosts[i].sin_addr, AF_INET); - (void) sprintf(buf, "%8c %.64s", 'a' + i, + (void) snprintf(buf, sizeof(buf), + "%8c %.64s", 'a' + i, hp != NULL ? hp->h_name : inet_ntoa(hosts->sin_addr)); put_str(buf); |