patch-2.4.10 linux/net/khttpd/rfc.c

Next file: linux/net/khttpd/waitheaders.c
Previous file: linux/net/khttpd/datasending.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/net/khttpd/rfc.c linux/net/khttpd/rfc.c
@@ -326,9 +326,9 @@
 			
 			strncpy(Head->FileName,sysctl_khttpd_docroot,sizeof(Head->FileName));
 			PrefixLen = strlen(sysctl_khttpd_docroot);
-			Head->FileNameLength = min(unsigned int, 255, tmp - Buffer + PrefixLen);		
+			Head->FileNameLength = min_t(unsigned int, 255, tmp - Buffer + PrefixLen);		
 			
-			strncat(Head->FileName,Buffer,min(unsigned int, 255 - PrefixLen, tmp - Buffer));
+			strncat(Head->FileName,Buffer,min_t(unsigned int, 255 - PrefixLen, tmp - Buffer));
 					
 			Buffer=EOL+1;	
 #ifdef BENCHMARK
@@ -341,7 +341,7 @@
 		{
 			Buffer+=19;
 			
-			strncpy(Head->IMS,Buffer,min(unsigned int, 127,EOL-Buffer-1));
+			strncpy(Head->IMS,Buffer,min_t(unsigned int, 127,EOL-Buffer-1));
 					
 			Buffer=EOL+1;	
 			continue;
@@ -351,7 +351,7 @@
 		{
 			Buffer+=12;
 			
-			strncpy(Head->Agent,Buffer,min(unsigned int, 127,EOL-Buffer-1));
+			strncpy(Head->Agent,Buffer,min_t(unsigned int, 127,EOL-Buffer-1));
 					
 			Buffer=EOL+1;	
 			continue;
@@ -362,7 +362,7 @@
 		{
 			Buffer+=6;
 			
-			strncpy(Head->Host,Buffer,min(unsigned int, 127,EOL-Buffer-1));
+			strncpy(Head->Host,Buffer,min_t(unsigned int, 127,EOL-Buffer-1));
 					
 			Buffer=EOL+1;	
 			continue;

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