projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix string copy compilation warnings
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index 24e6fb0757d84d3ceafb21a18cd12b5016af8307..17fa31fb3cd48924be886d55569b7c1356e72faf 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-829,7
+829,8
@@
static unsigned long long get_fs_free_counts(struct thread_data *td)
continue;
fm = calloc(1, sizeof(*fm));
- strncpy(fm->__base, buf, sizeof(fm->__base) - 1);
+ strncpy(fm->__base, buf, sizeof(fm->__base));
+ fm->__base[255] = '\0';
fm->base = basename(fm->__base);
fm->key = sb.st_dev;
flist_add(&fm->list, &list);