]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: va_start should use the last named parameter 1396/head
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 27 Sep 2015 21:03:40 +0000 (23:03 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Sun, 27 Sep 2015 21:11:31 +0000 (23:11 +0200)
src/libsystemd/sd-bus/sd-bus.c

index 3310d3859d64178242b8c148e753ff8336c54024..a23f7257fa744e50b56223ebbdab16416e827005 100644 (file)
@@ -3467,7 +3467,7 @@ _public_ int sd_bus_path_encode_many(char **out, const char *path_template, ...)
 
         path_length = strlen(path_template);
 
-        va_start(list, out);
+        va_start(list, path_template);
         for (sep = strchr(path_template, '%'); sep; sep = strchr(sep + 1, '%')) {
                 const char *arg;
                 char *label;
@@ -3602,7 +3602,7 @@ _public_ int sd_bus_path_decode_many(const char *path, const char *path_template
                 return 0;
 
         /* copy the labels over to the caller */
-        va_start(list, path);
+        va_start(list, path_template);
         for (label_pos = labels; label_pos && *label_pos; ++label_pos) {
                 char **arg;