[Xfce4-commits] <xfce4-diskperf-plugin:master> Revert part of ec7954cdecd4cd758b62cfdb18a8930a005062e2

Florian Rivoal noreply at xfce.org
Fri Jan 21 14:20:02 CET 2011


Updating branch refs/heads/master
         to 7394d1e2aba581cccbe68ebdc2a00329af02b174 (commit)
       from 0ce9035cdba02a6f663f71b58f2bb3faf147a998 (commit)

commit 7394d1e2aba581cccbe68ebdc2a00329af02b174
Author: Florian Rivoal <frivoal at xfce.org>
Date:   Fri Jan 21 09:35:14 2011 +0900

    Revert part of ec7954cdecd4cd758b62cfdb18a8930a005062e2
    
    The error check added on the return value of scanf is wrong, as scanf
    will return 0 when called with "%*s". This prevented the panel from
    reading anything at all.

 panel-plugin/devperf.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/devperf.c b/panel-plugin/devperf.c
index 43da506..97b45f5 100644
--- a/panel-plugin/devperf.c
+++ b/panel-plugin/devperf.c
@@ -80,9 +80,7 @@ static int DevGetPerfData1 (dev_t p_iDevice, struct devperf_t *p_poPerf)
 	    while ((c = fgetc (pF)) && (c != '\n'));	/* Goto next line */
 	    continue;
 	}
-	n = fscanf (pF, "%*s");	/* Skip device name */
-	if (n != 1)
-	    goto Error;
+	fscanf (pF, "%*s");	/* Skip device name */
 	/* Read rest of line into acStats */
 	if (!(fgets (acStats, sizeof (acStats), pF)))
 	    goto Error;



More information about the Xfce4-commits mailing list