From 4235c11757312bb42ddfa214b225226b248c4508 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 20 Aug 2024 12:39:15 +0100 Subject: [PATCH] gunixmounts: Fix use of uninitialised variable And drop a load of unused variables. Fixes commit 5040cf19436851a7ad8f7231705d44a831cb3836. Signed-off-by: Philip Withnall --- gio/gunixmounts.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 96733d9cc..1ebc9a7a1 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -809,14 +809,13 @@ _g_unix_mounts_get_from_file (const char *table_path, { struct mnttab mntent; FILE *file; - const char *read_file; GUnixMountEntry *mount_entry; GPtrArray *return_array = NULL; if (time_read_out != NULL) *time_read_out = get_mounts_timestamp (); - file = setmntent (read_file, "re"); + file = setmntent (table_path, "re"); if (file == NULL) return NULL; @@ -1290,7 +1289,6 @@ _g_unix_mount_points_get_from_file (const char *table_path, #endif struct mntent *mntent; FILE *file; - char *read_file; GUnixMountPoint *mount_point; GPtrArray *return_array = NULL; @@ -1401,7 +1399,6 @@ _g_unix_mount_points_get_from_file (const char *table_path, { struct mnttab mntent; FILE *file; - char *read_file; GUnixMountPoint *mount_point; GPtrArray *return_array = NULL; @@ -1597,7 +1594,6 @@ _g_unix_mount_points_get_from_file (const char *table_path, { struct mntent *mntent; FILE *file; - char *read_file; GUnixMountPoint *mount_point; AixMountTableEntry mntent; GPtrArray *return_array = NULL;