[PATCH] remove unused pointer to struct mntent returned from getmntent_r
Guillem Jover
guillem.jover at nokia.com
Fri Feb 13 10:36:59 PST 2009
---
hald/linux/addons/addon-storage.c | 3 +--
hald/linux/blockdev.c | 3 +--
hald/linux/probing/probe-storage.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/hald/linux/addons/addon-storage.c b/hald/linux/addons/addon-storage.c
index fff22d6..383b9b8 100644
--- a/hald/linux/addons/addon-storage.c
+++ b/hald/linux/addons/addon-storage.c
@@ -250,7 +250,6 @@ is_mounted (const char *device_file)
FILE *f;
dbus_bool_t rc;
struct mntent mnt;
- struct mntent *mnte;
char buf[512];
rc = FALSE;
@@ -258,7 +257,7 @@ is_mounted (const char *device_file)
if ((f = setmntent ("/etc/mtab", "r")) == NULL)
goto out;
- while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+ while (getmntent_r (f, &mnt, buf, sizeof(buf)) != NULL) {
if (strcmp (device_file, mnt.mnt_fsname) == 0) {
rc = TRUE;
goto out1;
diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
index 3fbb51a..f343e75 100644
--- a/hald/linux/blockdev.c
+++ b/hald/linux/blockdev.c
@@ -205,7 +205,6 @@ blockdev_refresh_mount_state (HalDevice *d)
{
FILE *f;
struct mntent mnt;
- struct mntent *mnte;
char buf[1024];
GSList *volumes = NULL;
GSList *volume;
@@ -226,7 +225,7 @@ blockdev_refresh_mount_state (HalDevice *d)
goto exit;
/* loop over /proc/mounts */
- while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+ while (getmntent_r (f, &mnt, buf, sizeof(buf)) != NULL) {
struct stat statbuf;
dev_t devt;
diff --git a/hald/linux/probing/probe-storage.c b/hald/linux/probing/probe-storage.c
index 46f2531..dd5681c 100644
--- a/hald/linux/probing/probe-storage.c
+++ b/hald/linux/probing/probe-storage.c
@@ -78,7 +78,6 @@ is_mounted (const char *device_file)
FILE *f;
dbus_bool_t rc;
struct mntent mnt;
- struct mntent *mnte;
char buf[512];
rc = FALSE;
@@ -86,7 +85,7 @@ is_mounted (const char *device_file)
if ((f = setmntent ("/etc/mtab", "r")) == NULL)
goto out;
- while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
+ while (getmntent_r (f, &mnt, buf, sizeof(buf)) != NULL) {
if (strcmp (device_file, mnt.mnt_fsname) == 0) {
rc = TRUE;
goto out1;
--
1.6.0.2
More information about the hal
mailing list