]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
krbd.cc: fix parameter to variadic function
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 13 Apr 2018 13:47:58 +0000 (15:47 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 13 Apr 2018 22:15:57 +0000 (00:15 +0200)
Fix for:

[src/krbd.cc:549]: (portability) Passing NULL after the last typed
 argument to a variadic function leads to undefined behaviour.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/krbd.cc

index c7baaebc922fdd6011556a7a25b1eb6e86d28f38..97ba92ac3a75d771beba052b63339c99df67cc69 100644 (file)
@@ -546,7 +546,7 @@ static int do_unmap(struct udev *udev, dev_t devno, const string& buf)
          * libudev does not provide the "wait until the queue is empty"
          * API or the sufficient amount of primitives to build it from.
          */
-        string err = run_cmd("udevadm", "settle", "--timeout", "10", NULL);
+        string err = run_cmd("udevadm", "settle", "--timeout", "10", (char*)NULL);
         if (!err.empty())
           cerr << "rbd: " << err << std::endl;
       }