Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-9934 build: address issues raised by gcc7
[fs/lustre-release.git]
/
lustre
/
utils
/
lsnapshot.c
diff --git
a/lustre/utils/lsnapshot.c
b/lustre/utils/lsnapshot.c
index
3221f74
..
4b10836
100644
(file)
--- a/
lustre/utils/lsnapshot.c
+++ b/
lustre/utils/lsnapshot.c
@@
-1325,8
+1325,7
@@
static int snapshot_create(struct snapshot_instance *si)
return rc;
srandom(tv.tv_usec);
- snprintf(new_fsname, 8, "%08x", (__u32)random());
- new_fsname[8] = '\0';
+ snprintf(new_fsname, sizeof(new_fsname), "%08x", (__u32)random());
rc = snapshot_get_mgsnode(si, buf, sizeof(buf));
if (rc)