summary refs log tree commit diff stats
path: root/plugins/sysinfo
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2013-10-10 00:05:22 -0400
committerTingPing <tingping@tingping.se>2013-10-10 00:05:22 -0400
commitc226f4089ae99283dab4f681710ce798c3908969 (patch)
tree8f1b9b8373ca4b1bb09c39194279d524b2c93fda /plugins/sysinfo
parente244001cee150d574e668aaf478626a036d31cc9 (diff)
Fix a few cppcheck warnings.
Use the proper data type in format functions and fix a resource leak.
Diffstat (limited to 'plugins/sysinfo')
-rw-r--r--plugins/sysinfo/xsys.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/sysinfo/xsys.c b/plugins/sysinfo/xsys.c
index 21ba6d8f..474729c5 100644
--- a/plugins/sysinfo/xsys.c
+++ b/plugins/sysinfo/xsys.c
@@ -140,11 +140,11 @@ print_summary (int announce, char* format)
 
 	if (giga)
 	{
-		snprintf (buffer, bsize, "%d x %s (%s) @ %.2fGHz", count, cpu_model, cpu_vendor, cpu_freq);
+		snprintf (buffer, bsize, "%u x %s (%s) @ %.2fGHz", count, cpu_model, cpu_vendor, cpu_freq);
 	}
 	else
 	{
-		snprintf (buffer, bsize, "%d x %s (%s) @ %.0fMHz", count, cpu_model, cpu_vendor, cpu_freq);
+		snprintf (buffer, bsize, "%u x %s (%s) @ %.0fMHz", count, cpu_model, cpu_vendor, cpu_freq);
 	}
 
 	format_output ("CPU", buffer, format);
@@ -332,11 +332,11 @@ print_cpu (int announce, char* format)
 
 	if (giga)
 	{
-		snprintf (buffer, bsize, "%d x %s (%s) @ %.2fGHz w/ %s L2 Cache", count, model, vendor, freq, cache);
+		snprintf (buffer, bsize, "%u x %s (%s) @ %.2fGHz w/ %s L2 Cache", count, model, vendor, freq, cache);
 	}
 	else
 	{
-		snprintf (buffer, bsize, "%d x %s (%s) @ %.0fMHz w/ %s L2 Cache", count, model, vendor, freq, cache);
+		snprintf (buffer, bsize, "%u x %s (%s) @ %.0fMHz w/ %s L2 Cache", count, model, vendor, freq, cache);
 	}
 
 	format_output ("CPU", buffer, format);