]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_fuse: use sizeof get the buf length 11176/head
authorLeo Zhang <nguzcf@gmail.com>
Wed, 21 Sep 2016 16:25:23 +0000 (00:25 +0800)
committerLeo Zhang <nguzcf@gmail.com>
Wed, 21 Sep 2016 16:25:23 +0000 (00:25 +0800)
Signed-off-by: LeoZhang <nguzcf@gmail.com>
src/ceph_fuse.cc

index eeb0c29f20863a19e549201cf7639ce13f9e4345..f0ff9a6f7e6c8de0289774f2aa17773730650359 100644 (file)
@@ -161,7 +161,7 @@ int main(int argc, const char **argv, const char *envp[]) {
 
          char buf[5050];
          string mountpoint = cfuse->get_mount_point();
-         snprintf(buf, 5049, "fusermount -u -z %s", mountpoint.c_str());
+         snprintf(buf, sizeof(buf), "fusermount -u -z %s", mountpoint.c_str());
          int umount_r = system(buf);
          if (umount_r) {
            if (umount_r != -1) {