On 11/25/2013 09:48 PM, Michael S. Tsirkin wrote: > g_string_vprintf was only introduced in 2.24 so switch to vsnprintf > instead. A bit uglier but name size is fixed at 4 bytes here so it's > easy.
You list 2.24 here, > - GString *s = g_string_new(""); > + /* It would be nicer to use g_string_vprintf but it's only there in 2.22 > */ ... 2.22 here. But https://developer.gnome.org/glib/2.28/glib-Strings.html#g-string-vprintf says "since 2.14". > + char s[] = "XXXX"; char s[5]; Initializing it is a waste of time. r~