Trivial cosmetic unimportant issue (urgent)

2 messages, 2 authors, 2003-07-23 · open the first message on its own page

Trivial cosmetic unimportant issue (urgent)

From: Sean <hidden>
Date: 2003-07-23 19:12:24

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

Re: Trivial cosmetic unimportant issue (urgent)

From: David S. Miller <hidden>
Date: 2003-07-23 20:19:28

On Wed, 23 Jul 2003 15:12:24 -0400
"Sean" [off-list ref] 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.
--- net/core/net-sysfs.c.~1~	Wed Jul 23 12:20:15 2003
+++ net/core/net-sysfs.c	Wed Jul 23 12:20:24 2003
@@ -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 */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help