libvirt List Archives
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

Alessandro

1 Apr 2025 1 Apr '25
10:55 a.m.

...
...

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.

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.12.