>> tmp = g_strdup_printf(" #include %s<libvirt/%s.files>\n", >> ifexists, ctl->uuid); >> + tmp_local = g_strdup_printf(" #include >> %s<libvirt/%s.local>\n", ifexists, ctl->uuid); >> + new_tmp = g_strconcat(tmp, tmp_local, NULL); >> + g_free(tmp); >> + tmp = g_steal_pointer(&new_tmp); > >While this works it is kinda convoluted. Instead of introducing a new >g_strdup_printf call just extend the current one > > tmp = g_strdup_printf(" #include %s<libvirt/%s.files>\n" \ > " #include %s<libvirt/%s.local>\n", > ifexists, ctl->uuid, ifexists, ctl->uuid);
TIL, I didn't know I could extend g_strdup_printf call. Thanks for the suggestion and the review Daniel, I appreciate it. Attached, the third revision with that change applied. Thank you, Best regards A.