Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs long_ad is a mix of struct and union, so use...
details: https://anonhg.NetBSD.org/src/rev/7c031a55035e
branches: trunk
changeset: 325351:7c031a55035e
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Dec 19 23:00:50 2013 +0000
description:
long_ad is a mix of struct and union, so use memset to initialise in the
one place it is used.
diffstat:
usr.sbin/makefs/udf.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 493fcdc08d8b -r 7c031a55035e usr.sbin/makefs/udf.c
--- a/usr.sbin/makefs/udf.c Thu Dec 19 22:45:38 2013 +0000
+++ b/usr.sbin/makefs/udf.c Thu Dec 19 23:00:50 2013 +0000
@@ -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 @@
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 @@
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++;
Home |
Main Index |
Thread Index |
Old Index