No description
Using 'g_string_free(outbuf, FALSE)', which is equivalent to the newer ‘g_string_free_and_steal’ function, the management structure from the GLib string will be freed while the underlying "actual" char * C string won't, and thus the caller of this needs to take care of that freeing that string when not needed anymore. This is used in a few places in pmxcfs by design, as newer compiler and glib gained intrinsics to help detecting missuse one must now use the result of that function, which is the underlying char pointer, as heuristic for the caller to signal that one is aware of that contract. As we pulled out the pointer earlier directly and then called this partial free method, all worked fine but the compiler couldn't be sure about this. Adapt the code accordingly, there should be semantic change whatsoever, but it gets actually slightly shorter, which is nice. While at it also replace some uses of 1 with the TRUE constant, it's the same but it's more telling for those accustomed to code using the Glib. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> |
||
|---|---|---|
| debian | ||
| src | ||
| .gitignore | ||
| Makefile | ||