From ac3ad6d2aabb2ee5ebc541e43bfb9f25c96383e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Sat, 29 Oct 2005 19:23:50 +0000 Subject: [PATCH] Removed 1 g_return_*. * glibtop_private.c: (read_boot_time): Removed 1 g_return_*. --- sysdeps/linux/ChangeLog | 6 ++++++ sysdeps/linux/glibtop_private.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index 8a2d7985..f1bb5b09 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,9 @@ +2005-10-29 Benoît Dejean + + * glibtop_private.c: (read_boot_time): + + Removed 1 g_return_*. + 2005-08-15 Benoît Dejean * cpu.c: (glibtop_get_cpu_s): diff --git a/sysdeps/linux/glibtop_private.c b/sysdeps/linux/glibtop_private.c index 2deea49c..0ff47a62 100644 --- a/sysdeps/linux/glibtop_private.c +++ b/sysdeps/linux/glibtop_private.c @@ -109,7 +109,10 @@ read_boot_time(glibtop *server) btime = strstr(buffer, "btime"); - g_return_val_if_fail(btime != NULL, 0UL); + if (!btime) { + glibtop_warn_io_r(server, "cannot find btime in /proc/stat"); + return 0UL; + } btime = skip_token(btime); return strtoul(btime, NULL, 10);