patch-2.4.9 linux/net/unix/af_unix.c
Next file: linux/net/wanrouter/wanmain.c
Previous file: linux/net/sunrpc/xprt.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Wed Aug 15 01:22:18 2001
- Orig file:
v2.4.8/linux/net/unix/af_unix.c
- Orig date:
Sun Aug 12 13:28:01 2001
diff -u --recursive --new-file v2.4.8/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
@@ -8,7 +8,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
- * Version: $Id: af_unix.c,v 1.118 2001/07/18 07:52:37 davem Exp $
+ * Version: $Id: af_unix.c,v 1.121 2001/08/13 18:56:13 davem Exp $
*
* Fixes:
* Linus Torvalds : Assorted bug cures.
@@ -111,8 +111,6 @@
#include <asm/checksum.h>
-#define min(a,b) (((a)<(b))?(a):(b))
-
int sysctl_unix_max_dgram_qlen = 10;
unix_socket *unix_socket_table[UNIX_HASH_SIZE+1];
@@ -1338,7 +1336,7 @@
* fallback size buffer which is under a page and will
* succeed. [Alan]
*/
- size = min(size, skb_tailroom(skb));
+ size = min(int, size, skb_tailroom(skb));
memcpy(UNIXCREDS(skb), &scm->creds, sizeof(struct ucred));
if (scm->fp)
@@ -1570,7 +1568,7 @@
sunaddr = NULL;
}
- chunk = min(skb->len, size);
+ chunk = min(unsigned int, skb->len, size);
if (memcpy_toiovec(msg->msg_iov, skb->data, chunk)) {
skb_queue_head(&sk->receive_queue, skb);
if (copied == 0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)