From 6e0b5fc793835d0ca9562c755db45bd4e6665dca Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 19 Sep 2008 18:48:33 +0000 Subject: [PATCH] Remove dereference of uninitialized 'i'. Found-by: LLVM/Clang Static Analyzer --- usr.sbin/bootparamd/bootparamd/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bootparamd/bootparamd/main.c b/usr.sbin/bootparamd/bootparamd/main.c index 2296a43f57..9bce2d7ad6 100644 --- a/usr.sbin/bootparamd/bootparamd/main.c +++ b/usr.sbin/bootparamd/bootparamd/main.c @@ -9,7 +9,7 @@ use and modify. Please send modifications and/or suggestions + bug fixes to /* * $FreeBSD: src/usr.sbin/bootparamd/bootparamd/main.c,v 1.9 1999/08/28 01:15:39 peter Exp $ - * $DragonFly: src/usr.sbin/bootparamd/bootparamd/main.c,v 1.5 2004/12/18 22:48:02 swildner Exp $ + * $DragonFly: src/usr.sbin/bootparamd/bootparamd/main.c,v 1.6 2008/09/19 18:48:33 swildner Exp $ */ #include #include @@ -42,7 +42,6 @@ int main(int argc, char **argv) { SVCXPRT *transp; - int i; struct hostent *he; struct stat buf; char c; @@ -62,7 +61,7 @@ main(int argc, char **argv) bcopy(he->h_addr, (char *)&route_addr, sizeof(route_addr)); break; } else { - errx(1, "no such host %s", argv[i]); + errx(1, "no such host %s", optarg); } } case 'f': -- 2.41.0