1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00

Merge pull request #1396 from phomes/va-start

sd-bus: va_start should use the last named parameter
This commit is contained in:
David Herrmann 2015-09-28 10:57:07 +02:00
commit 9dc5db34ad

View File

@ -3467,7 +3467,7 @@ _public_ int sd_bus_path_encode_many(char **out, const char *path_template, ...)
path_length = strlen(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, '%')) { for (sep = strchr(path_template, '%'); sep; sep = strchr(sep + 1, '%')) {
const char *arg; const char *arg;
char *label; char *label;
@ -3602,7 +3602,7 @@ _public_ int sd_bus_path_decode_many(const char *path, const char *path_template
return 0; return 0;
/* copy the labels over to the caller */ /* 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) { for (label_pos = labels; label_pos && *label_pos; ++label_pos) {
char **arg; char **arg;