Skip to contentSkip to conversation

use buf, not (non-existent) ptr

PATCH New Christian Hesse 1 participant 1 message Dec 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use buf, not (non-existent) ptr

From: Christian Hesse <[email protected]>

Shared code was moved to a function, but variable name has not been updated. Use buf (passed to the function) instead of ptr.

This fixes regressen from upstream commit
7d6aadcd0a1dc795d72e1ab311aee333c763fe71.

---
 ip/tunnel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ip/tunnel.c +1 -1
index 1dd8092..39f825b 100644
@@ -208,7 +208,7 @@ void tnl_print_stats(const char *buf)
 		      tx_bytes, tx_packets, tx_errs, tx_drops,
 		      tx_fifo, tx_colls, tx_carrier, rx_multi;
 
-	if (sscanf(ptr, "%lu%lu%lu%lu%lu%lu%lu%*d%lu%lu%lu%lu%lu%lu%lu",
+	if (sscanf(buf, "%lu%lu%lu%lu%lu%lu%lu%*d%lu%lu%lu%lu%lu%lu%lu",
 	           &rx_bytes, &rx_packets, &rx_errs, &rx_drops,
 	           &rx_fifo, &rx_frame, &rx_multi,
 	           &tx_bytes, &tx_packets, &tx_errs, &tx_drops,
Signature · 1 line
2.6.4