diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2008-07-01 04:08:54 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2008-07-01 04:08:54 +0000 |
commit | 4d9c5ffc9a79bfebff28a4f8ec81aeb1bb468d78 (patch) | |
tree | 1a67980b7daa550b6f4be6a59035ef6e89e2cf7c | |
parent | 18d2e2d2106a01c55babb507cdb2188bee28e6d5 (diff) |
Initialize variable before checking against NULL.
OK deraadt, otto, krw.
-rw-r--r-- | sbin/disklabel/disklabel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index e2c3e40b8a3..92507bbf8a0 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.130 2008/06/25 18:31:07 otto Exp $ */ +/* $OpenBSD: disklabel.c,v 1.131 2008/07/01 04:08:53 ray Exp $ */ /* * Copyright (c) 1987, 1993 @@ -39,7 +39,7 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint -static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.130 2008/06/25 18:31:07 otto Exp $"; +static const char rcsid[] = "$OpenBSD: disklabel.c,v 1.131 2008/07/01 04:08:53 ray Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -605,7 +605,7 @@ findopenbsd(int f, off_t mbroff, struct dos_partition **first, int *n) struct dos_partition * readmbr(int f) { - struct dos_partition *dp, *first; + struct dos_partition *dp, *first = NULL; int part, n = 8; dp = findopenbsd(f, DOSBBSECTOR, &first, &n); |