]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: fix snprintf warning
authorSage Weil <sage.weil@dreamhost.com>
Fri, 28 Oct 2011 03:28:57 +0000 (20:28 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 28 Oct 2011 03:28:57 +0000 (20:28 -0700)
warning: tools/ceph.cc:146: format not a string literal and no format arguments

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/tools/ceph.cc

index d720fac33c1e606651d5480a6ca26bfbacc68f52..0518e30286059143084256e33a724b12b786811b 100644 (file)
@@ -143,7 +143,7 @@ int do_admin_socket(string path, uint32_t cmd)
 
   memset(&address, 0, sizeof(struct sockaddr_un));
   address.sun_family = AF_UNIX;
-  snprintf(address.sun_path, UNIX_PATH_MAX, path.c_str());
+  snprintf(address.sun_path, UNIX_PATH_MAX, "%s", path.c_str());
 
   if (connect(fd, (struct sockaddr *) &address, 
              sizeof(struct sockaddr_un)) != 0) {