* GPL HEADER END
*/
/*
- * Copyright (c) 2016, Intel Corporation.
+ * Copyright (c) 2017, Intel Corporation.
*
* lustre/utils/lsnapshot.c
*
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)