Fix getsockopt decoding

Andreas Schwab schwab at suse.de
Sat Jan 22 11:54:28 UTC 2005


The last argument of getsockopt is a pointer to int, not long.

Andreas.

2005-01-22  Andreas Schwab  <schwab at suse.de>

	* net.c (sys_getsockopt): Change type of len to int.

--- net.c.~1.44.~	2005-01-22 20:44:18.000000000 +0100
+++ net.c	2005-01-22 20:45:51.896159609 +0100
@@ -1559,7 +1559,7 @@ struct tcb *tcp;
 			break;
 		}
 	} else {
-		long len;
+		int len;
 		if (syserror(tcp) || umove (tcp, tcp->u_arg[4], &len) < 0) {
 			tprintf(", %#lx, %#lx",
 				tcp->u_arg[3], tcp->u_arg[4]);
@@ -1597,7 +1597,7 @@ struct tcb *tcp;
 		else {
 			printstr (tcp, tcp->u_arg[3], len);
 		}
-		tprintf(", [%ld]", len);
+		tprintf(", [%d]", len);
 	}
 	return 0;
 }

-- 
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




More information about the Strace-devel mailing list