Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libutil getlabelusesmbr: initialize 'oldlenp' parameter ...
details: https://anonhg.NetBSD.org/src/rev/5cef37c5198b
branches: trunk
changeset: 769233:5cef37c5198b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Sep 04 12:34:49 2011 +0000
description:
getlabelusesmbr: initialize 'oldlenp' parameter to sysctlbyname
diffstat:
lib/libutil/getlabelsector.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r ddf396a84d5f -r 5cef37c5198b lib/libutil/getlabelsector.c
--- a/lib/libutil/getlabelsector.c Sun Sep 04 12:31:30 2011 +0000
+++ b/lib/libutil/getlabelsector.c Sun Sep 04 12:34:49 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getlabelsector.c,v 1.4 2011/08/30 12:39:52 bouyer Exp $ */
+/* $NetBSD: getlabelsector.c,v 1.5 2011/09/04 12:34:49 jmcneill Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getlabelsector.c,v 1.4 2011/08/30 12:39:52 bouyer Exp $");
+__RCSID("$NetBSD: getlabelsector.c,v 1.5 2011/09/04 12:34:49 jmcneill Exp $");
#endif
#include <sys/param.h>
@@ -80,6 +80,7 @@
int use;
size_t uselen;
+ uselen = sizeof(use);
if (sysctlbyname("kern.labelusesmbr", &use, &uselen,
NULL, (size_t)0) < 0)
return (-1);
Home |
Main Index |
Thread Index |
Old Index