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-11233 utils: fix build warnings for gcc8
[fs/lustre-release.git]
/
lustre
/
utils
/
liblustreapi_layout.c
diff --git
a/lustre/utils/liblustreapi_layout.c
b/lustre/utils/liblustreapi_layout.c
index
b967356
..
bb1b5fc
100644
(file)
--- a/
lustre/utils/liblustreapi_layout.c
+++ b/
lustre/utils/liblustreapi_layout.c
@@
-775,7
+775,7
@@
static void get_parent_dir(const char *path, char *buf, size_t size)
{
char *p;
- strncpy(buf, path, size);
+ strncpy(buf, path, size
- 1
);
p = strrchr(buf, '/');
if (p != NULL) {