src: replace last_component() with g_path_get_basename()

The last_component() method is a GNULIB custom function
that returns a pointer to the base name in the path.
This is similar to g_path_get_basename() but without the
malloc. The extra malloc is no trouble for libvirt's
needs so we can use g_path_get_basename().

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2020-01-03 15:42:13 +00:00
parent f5e9bdb87f
commit 12d17dcc26
11 changed files with 35 additions and 48 deletions
-2
View File
@@ -36,8 +36,6 @@
# define fprintf virFilePrintf
#endif
extern char *progname;
/* Makefile.am provides these two definitions */
#if !defined(abs_srcdir) || !defined(abs_builddir)
# error Fix Makefile.am