Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/lpr/common_source CID 1125882: Don't use unitialize...
details: https://anonhg.NetBSD.org/src/rev/4e20f7d35623
branches: trunk
changeset: 791332:4e20f7d35623
user: christos <christos%NetBSD.org@localhost>
date: Wed Nov 13 21:19:17 2013 +0000
description:
CID 1125882: Don't use unitialized variable; move code inside conditional
where it was intended.
diffstat:
usr.sbin/lpr/common_source/common.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r eca1aa116a8b -r 4e20f7d35623 usr.sbin/lpr/common_source/common.c
--- a/usr.sbin/lpr/common_source/common.c Wed Nov 13 20:55:08 2013 +0000
+++ b/usr.sbin/lpr/common_source/common.c Wed Nov 13 21:19:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.41 2013/10/19 17:16:25 christos Exp $ */
+/* $NetBSD: common.c,v 1.42 2013/11/13 21:19:17 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: common.c,v 1.41 2013/10/19 17:16:25 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.42 2013/11/13 21:19:17 christos Exp $");
#endif
#endif /* not lint */
@@ -399,16 +399,15 @@
sin6p = (struct sockaddr_in6 *)ifa->ifa_addr;
if (ifa->ifa_addr->sa_family == AF_INET6 &&
ifa->ifa_addr->sa_len == sizeof(sin6)) {
- inet6_getscopeid(sin6p, 3);
+ inet6_getscopeid(sin6p, 3);
if (getnameinfo((struct sockaddr *)&sin6,
sin6.sin6_len, lname, sizeof(lname),
NULL, 0, niflags) != 0)
continue;
- }
-
- if (strcmp(rname, lname) == 0) {
- remote = 0;
- goto done;
+ if (strcmp(rname, lname) == 0) {
+ remote = 0;
+ goto done;
+ }
}
}
}
Home |
Main Index |
Thread Index |
Old Index