Skip to contentSkip to conversation

Trivial cosmetic unimportant issue (urgent)

DISCUSSION Sean 2 participants 2 messages Jul 23, 2003

Subsystems (2)
lore
Share & tools
lore

Sean

author
#0 lore raw

Hi folks,

Just a few days uptime and sysfs is reporting that i've transfered a _negative_ number of bytes! Any chance this could be
unsigned output instead? The display is created in a common net_device_stat_show but none of the others values should go negative
either.

Cheers,
Sean

#1 lore raw
Quoted 3 lines · On Wed, 23 Jul 2003 15:12:24 -0400 "Sean" <[email protected]> wrote:

Just a few days uptime and sysfs is reporting that i've transfered a _negative_ number of bytes! Any chance this could be
unsigned output instead? The display is created in a common net_device_stat_show but none of the others values should go negative
either.

This should fix it.

core/net-sysfs.c renamed from core/net-sysfs.c.~1~ +1 -1
@@ -186,7 +186,7 @@
 
 static ssize_t net_device_stat_show(unsigned long var, char *buf)
 {
-	return sprintf(buf, "%ld\n", var);
+	return sprintf(buf, "%lu\n", var);
 }
 
 /* generate a read-only statistics attribute */