3970 e = object_path_startswith(path, prefix); (gdb) p path $1 = 0x55c5a166f768 "/org/freedesktop/portable1/image" (gdb) p prefix $2 = 0x55c59ffc2928 "/org/freedesktop/portable1/image" (gdb) p e $1 = 0x5581a1675788 "" This can be a bit confusing in certain cases, so add a comment and a test to make the behaviour clearer and explicit.