Module Name: src Committed By: kalvisd Date: Tue Dec 3 05:40:39 UTC 2024
Modified Files: src/usr.sbin/mopd/common: device.c Log Message: mopd/common/device.c: initialise local variable before use, to appease GCC 12. Fix contributed by Jan-Benedict Glaw. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/mopd/common/device.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/mopd/common/device.c diff -u src/usr.sbin/mopd/common/device.c:1.13 src/usr.sbin/mopd/common/device.c:1.14 --- src/usr.sbin/mopd/common/device.c:1.13 Wed Jun 8 01:11:49 2016 +++ src/usr.sbin/mopd/common/device.c Tue Dec 3 05:40:39 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: device.c,v 1.13 2016/06/08 01:11:49 christos Exp $ */ +/* $NetBSD: device.c,v 1.14 2024/12/03 05:40:39 kalvisd Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include "port.h" #ifndef lint -__RCSID("$NetBSD: device.c,v 1.13 2016/06/08 01:11:49 christos Exp $"); +__RCSID("$NetBSD: device.c,v 1.14 2024/12/03 05:40:39 kalvisd Exp $"); #endif #include "os.h" @@ -91,6 +91,7 @@ deviceOpen(const char *ifname, u_short p strlcpy(tmp.if_name, ifname, sizeof(tmp.if_name)); tmp.iopen = pfInit; + tmp.fd = -1; switch (proto) { case MOP_K_PROTO_RC: