Module Name:    src
Committed By:   joerg
Date:           Thu Dec 19 23:00:50 UTC 2013

Modified Files:
        src/usr.sbin/makefs: udf.c

Log Message:
long_ad is a mix of struct and union, so use memset to initialise in the
one place it is used.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/makefs/udf.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/makefs/udf.c
diff -u src/usr.sbin/makefs/udf.c:1.15 src/usr.sbin/makefs/udf.c:1.16
--- src/usr.sbin/makefs/udf.c:1.15	Thu Dec 19 22:10:03 2013
+++ src/usr.sbin/makefs/udf.c	Thu Dec 19 23:00:50 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.c,v 1.15 2013/12/19 22:10:03 christos Exp $ */
+/* $NetBSD: udf.c,v 1.16 2013/12/19 23:00:50 joerg Exp $ */
 
 /*
  * Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: udf.c,v 1.15 2013/12/19 22:10:03 christos Exp $");
+__RCSID("$NetBSD: udf.c,v 1.16 2013/12/19 23:00:50 joerg Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -842,7 +842,7 @@ udf_estimate_walk(fsinfo_t *fsopts,
 		fsnode *root, char *dir, struct udf_stats *stats)
 {
 	struct fileid_desc *fid;
-	struct long_ad dummy_ref = { 0 };
+	struct long_ad dummy_ref;
 	fsnode *cur;
 	fsinode *fnode;
 	size_t pathlen = strlen(dir);
@@ -881,6 +881,7 @@ udf_estimate_walk(fsinfo_t *fsopts,
 		case S_IFLNK:
 		case S_IFREG:
 			/* create dummy FID to see how long name will become */
+			memset(&dummy_ref, 0, sizeof(dummy_ref));
 			udf_create_fid(ddoff, fid, cur->name, 0, &dummy_ref);
 
 			nentries++;

Reply via email to