Merge pull request #11176 from zealoussnow/wip-0922

ceph_fuse: use sizeof get the buf length

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-09-22 16:56:32 +08:00 committed by GitHub
commit 1300a766c2

View 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) {