From 59fd67c7e0112f0d5ffda5b3427ed72a42f192f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Tue, 29 Mar 2005 13:16:58 +0000 Subject: [PATCH] Removed a g_return_if_fail. * fsusage.c: (get_partition): Removed a g_return_if_fail. --- sysdeps/linux/ChangeLog | 4 ++++ sysdeps/linux/fsusage.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index db13720a..4bb2daaa 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,7 @@ +2005-03-29 Benoît Dejean + + * fsusage.c: (get_partition): Removed a g_return_if_fail. + 2005-03-27 Benoît Dejean * loadavg.c: (glibtop_get_loadavg_s): diff --git a/sysdeps/linux/fsusage.c b/sysdeps/linux/fsusage.c index 10920c3b..d90e6304 100644 --- a/sysdeps/linux/fsusage.c +++ b/sysdeps/linux/fsusage.c @@ -38,7 +38,8 @@ get_partition(const char *mountpoint) if(stat(mountpoint, &statb) == -1) return NULL; - g_return_val_if_fail((partitions = fopen("/proc/partitions", "r")), NULL); + if((partitions = fopen("/proc/partitions", "r")) == NULL) + return NULL; while(fgets(line, sizeof line, partitions)) {