diff options
Diffstat (limited to 'libglusterfs/src/common-utils.c')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 60725769096..09f0caa7e8a 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -3061,8 +3061,9 @@ gf_canonicalize_path (char *path)                  strncpy ((path + path_len + 1), dir, dir_path_len);                  path_len += dir_path_len + 1;                  dir = strtok_r (NULL, "/", &tmpstr); -                if (dir) -                        strncpy ((path + path_len), "/", 1); +                if (dir) { +                        path[path_len] = '/'; +                }          }          path[path_len] = '\0';          ret = 0;  | 
