Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libukfs Always initialize part to avoid triggering unini...
details: https://anonhg.NetBSD.org/src/rev/f9ee4d828eae
branches: trunk
changeset: 780283:f9ee4d828eae
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Jul 19 06:33:03 2012 +0000
description:
Always initialize part to avoid triggering uninitialized variable
warnings.
diffstat:
lib/libukfs/ukfs.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 75fbffc72998 -r f9ee4d828eae lib/libukfs/ukfs.h
--- a/lib/libukfs/ukfs.h Thu Jul 19 06:31:26 2012 +0000
+++ b/lib/libukfs/ukfs.h Thu Jul 19 06:33:03 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukfs.h,v 1.13 2009/12/03 14:23:49 pooka Exp $ */
+/* $NetBSD: ukfs.h,v 1.14 2012/07/19 06:33:03 joerg Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -130,8 +130,9 @@
#define UKFS_DEVICE_ARGVPROBE(part) \
do { \
- if (argc >= 3) \
- if (ukfs_part_probe(argv[argc-2], part) == -1) \
+ if (argc < 3) \
+ *part = NULL; \
+ else if (ukfs_part_probe(argv[argc-2], part) == -1) \
err(1, "ukfs_part_probe"); \
} while (/*CONSTCOND*/0)
Home |
Main Index |
Thread Index |
Old Index