diff options
author | dim <dim@FreeBSD.org> | 2017-04-13 17:11:50 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2017-04-13 17:11:50 +0000 |
commit | e21d11329bef286e18649ab6d1bc0147ba2f2fd1 (patch) | |
tree | c5f3ef0d4997af8cc544c72bc25483a15d583b5f /sbin | |
parent | 0a90775056fe49d839c413ed24736a863f75f570 (diff) | |
download | FreeBSD-src-e21d11329bef286e18649ab6d1bc0147ba2f2fd1.zip FreeBSD-src-e21d11329bef286e18649ab6d1bc0147ba2f2fd1.tar.gz |
MFC r314671 (by cem):
newfs_nandfs: Fix unaligned pointer warning
PR: 217532
Submitted by: Trond Endrestol <Trond.Endrestol at ximalas.info>
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/newfs_nandfs/newfs_nandfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/newfs_nandfs/newfs_nandfs.c b/sbin/newfs_nandfs/newfs_nandfs.c index 9500805..a00855f 100644 --- a/sbin/newfs_nandfs/newfs_nandfs.c +++ b/sbin/newfs_nandfs/newfs_nandfs.c @@ -520,6 +520,7 @@ save_segsum(struct nandfs_segment_summary *ss) static void create_fsdata(void) { + struct uuid tmp; memset(&fsdata, 0, sizeof(struct nandfs_fsdata)); @@ -540,7 +541,8 @@ create_fsdata(void) fsdata.f_checkpoint_size = sizeof(struct nandfs_checkpoint); fsdata.f_segment_usage_size = sizeof(struct nandfs_segment_usage); - uuidgen(&fsdata.f_uuid, 1); + uuidgen(&tmp, 1); + fsdata.f_uuid = tmp; if (volumelabel) memcpy(fsdata.f_volume_name, volumelabel, 16); |