[Xfce4-commits] <xfce4-cpufreq-plugin:master> Use the * modifier in scanf
Florian Rivoal
noreply at xfce.org
Wed Dec 29 19:20:03 CET 2010
Updating branch refs/heads/master
to 35dbdffac69a786ae1b5be8cef778f5e9c3ffb1b (commit)
from 595e46d7138f75236f3d5a1a4aa846f8af2f9258 (commit)
commit 35dbdffac69a786ae1b5be8cef778f5e9c3ffb1b
Author: Florian Rivoal <frivoal at xfce.org>
Date: Thu Dec 30 02:19:13 2010 +0900
Use the * modifier in scanf
Unused parts of scanf should be marked by *, rather than tentatively
stored in NULL pointers.
panel-plugin/xfce4-cpufreq-linux.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/xfce4-cpufreq-linux.c b/panel-plugin/xfce4-cpufreq-linux.c
index 59f464f..48480e8 100644
--- a/panel-plugin/xfce4-cpufreq-linux.c
+++ b/panel-plugin/xfce4-cpufreq-linux.c
@@ -304,10 +304,10 @@ cpufreq_cpu_read_procfs ()
cpu->available_governors = NULL;
sscanf (fileContent,
- "CPU %d %d kHz (%d %%) - %d kHz (%d %%) - %20s",
- NULL, &cpu->min_freq,
- NULL, &cpu->max_freq,
- NULL, cpu->cur_governor);
+ "CPU %*d %d kHz (%*d %%) - %d kHz (%*d %%) - %20s",
+ &cpu->min_freq,
+ &cpu->max_freq,
+ cpu->cur_governor);
cpu->min_freq *= 1000;
cpu->max_freq *= 1000;
More information about the Xfce4-commits
mailing list