]> Git Repo - qemu.git/commit - qga/commands-posix.c
use g_path_get_basename instead of basename
authorJulia Suvorova <[email protected]>
Thu, 1 Mar 2018 07:08:06 +0000 (10:08 +0300)
committerPaolo Bonzini <[email protected]>
Tue, 6 Mar 2018 13:01:29 +0000 (14:01 +0100)
commit3e015d815b3f28bfd874bf8a1697308ef9af2b4c
treec9007e013761351acda3bbc000e36d192a180827
parent4060e671c33679198d777558bf7c3750610e0f3d
use g_path_get_basename instead of basename

basename(3) and dirname(3) modify their argument and may return
pointers to statically allocated memory which may be overwritten by
subsequent calls.
g_path_get_basename and g_path_get_dirname have no such issues, and
therefore more preferable.

Signed-off-by: Julia Suvorova <[email protected]>
Message-Id: <1519888086[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
fsdev/virtfs-proxy-helper.c
hw/s390x/s390-ccw.c
hw/vfio/pci.c
hw/vfio/platform.c
qemu-io.c
qga/commands-posix.c
This page took 0.025668 seconds and 4 git commands to generate.