No description
Find a file
Thomas Lamprecht a86c4b3ba3 pmxcfs: use glib free_and_steal when taking ownership of underlying c string
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>
2025-06-02 19:25:23 +02:00
debian bump version to 8.1.0 2025-04-04 19:14:31 +02:00
src pmxcfs: use glib free_and_steal when taking ownership of underlying c string 2025-06-02 19:25:23 +02:00
.gitignore update gitignore 2023-05-31 13:50:26 +02:00
Makefile buildsys: add top-level make tidy target 2025-06-01 14:05:30 +02:00