patch-2.4.9 linux/fs/ncpfs/ncplib_kernel.c

Next file: linux/fs/ncpfs/ncpsign_kernel.c
Previous file: linux/fs/ncpfs/mmap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/fs/ncpfs/ncplib_kernel.c linux/fs/ncpfs/ncplib_kernel.c
@@ -13,11 +13,6 @@
 
 #include "ncplib_kernel.h"
 
-static inline int min(int a, int b)
-{
-	return a < b ? a : b;
-}
-
 static inline void assert_server_locked(struct ncp_server *server)
 {
 	if (server->lock == 0) {
@@ -132,7 +127,7 @@
 		ncp_unlock_server(server);
 		return result;
 	}
-	*target = min(ntohs(ncp_reply_word(server, 0)), size);
+	*target = min(unsigned int, ntohs(ncp_reply_word(server, 0)), size);
 
 	ncp_unlock_server(server);
 	return 0;
@@ -163,7 +158,8 @@
 
 	/* NCP over UDP returns 0 (!!!) */
 	result = ntohs(ncp_reply_word(server, 0));
-	if (result >= NCP_BLOCK_SIZE) size=min(result, size);
+	if (result >= NCP_BLOCK_SIZE)
+		size = min(int, result, size);
 	*ret_size = size;
 	*ret_options = ncp_reply_byte(server, 4);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)