Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig Initialize timespec "end" for the benefit of s...
details: https://anonhg.NetBSD.org/src/rev/27395932c9f3
branches: trunk
changeset: 332221:27395932c9f3
user: martin <martin%NetBSD.org@localhost>
date: Fri Sep 12 08:54:26 2014 +0000
description:
Initialize timespec "end" for the benefit of some gcc versions getting
"may be used uninitialized" warnings wrong.
diffstat:
sbin/ifconfig/ifconfig.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 4b24b0aa9f68 -r 27395932c9f3 sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c Fri Sep 12 07:59:36 2014 +0000
+++ b/sbin/ifconfig/ifconfig.c Fri Sep 12 08:54:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifconfig.c,v 1.232 2014/09/11 13:10:04 roy Exp $ */
+/* $NetBSD: ifconfig.c,v 1.233 2014/09/12 08:54:26 martin Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1983, 1993\
The Regents of the University of California. All rights reserved.");
-__RCSID("$NetBSD: ifconfig.c,v 1.232 2014/09/11 13:10:04 roy Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.233 2014/09/12 08:54:26 martin Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -522,7 +522,7 @@
int s;
const struct timespec ts = { .tv_sec = 0, .tv_nsec = WAIT_DAD };
const struct timespec add = { .tv_sec = wflag_secs, .tv_nsec = 0};
- struct timespec now, end;
+ struct timespec now, end = { .tv_sec = wflag_secs, .tv_nsec = 0};
if (wflag_secs) {
if (clock_gettime(CLOCK_MONOTONIC, &now) == -1)
Home |
Main Index |
Thread Index |
Old Index