From: Andy P. <at...@us...> - 2002-04-09 16:29:07
|
Update of /cvsroot/linux-vax/kernel-2.4/net/khttpd In directory usw-pr-cvs1:/tmp/cvs-serv32481/khttpd Modified Files: datasending.c main.c prototypes.h rfc.c security.h waitheaders.c Log Message: synch 2.4.15 commit 21 Index: datasending.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/khttpd/datasending.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- datasending.c 14 Jan 2001 17:16:59 -0000 1.1.1.1 +++ datasending.c 9 Apr 2002 16:29:01 -0000 1.2 @@ -105,8 +105,8 @@ Space = sock_wspace(CurrentRequest->sock->sk); - ReadSize = min(4*4096,CurrentRequest->FileLength - CurrentRequest->BytesSent); - ReadSize = min(ReadSize , Space ); + ReadSize = min_t(int, 4 * 4096, CurrentRequest->FileLength - CurrentRequest->BytesSent); + ReadSize = min_t(int, ReadSize, Space); if (ReadSize>0) { Index: main.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/khttpd/main.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- main.c 14 Jan 2001 17:17:01 -0000 1.1.1.1 +++ main.c 9 Apr 2002 16:29:01 -0000 1.2 @@ -138,7 +138,7 @@ changes +=DataSending(CPUNR); changes +=Userspace(CPUNR); changes +=Logging(CPUNR); - /* Test for incomming connections _again_, because it is possible + /* Test for incoming connections _again_, because it is possible one came in during the other steps, and the wakeup doesn't happen then. */ Index: prototypes.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/khttpd/prototypes.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- prototypes.h 14 Jan 2001 17:17:03 -0000 1.1.1.1 +++ prototypes.h 9 Apr 2002 16:29:01 -0000 1.2 @@ -19,17 +19,6 @@ #define CONFIG_KHTTPD_NUMCPU 16 /* Maximum number of threads */ -/* the TCP/IP stack defines a __BROKEN__ set of min/max functions !! */ -/* So we better define our own. */ - -/* Broken means: working on unsigned data only, which is not acceptable - for kHTTPd and probably a lot of other functions. */ - -#undef min -#undef max -#define min(a,b) ( (a) < (b) ? (a) : (b) ) -#define max(a,b) ( (a) > (b) ? (a) : (b) ) - #ifdef OOPSTRACE #define EnterFunction(x) printk("Enter: %s, %s line %i\n",x,__FILE__,__LINE__) #define LeaveFunction(x) printk("Leave: %s, %s line %i\n",x,__FILE__,__LINE__) Index: rfc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/khttpd/rfc.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- rfc.c 25 Feb 2001 23:14:57 -0000 1.1.1.2 +++ rfc.c 9 Apr 2002 16:29:01 -0000 1.2 @@ -101,7 +101,7 @@ /* The returned string is for READ ONLY, ownership of the memory is NOT - transfered. + transferred. */ { @@ -326,9 +326,9 @@ strncpy(Head->FileName,sysctl_khttpd_docroot,sizeof(Head->FileName)); PrefixLen = strlen(sysctl_khttpd_docroot); - Head->FileNameLength = min(255,tmp-Buffer+PrefixLen); + Head->FileNameLength = min_t(unsigned int, 255, tmp - Buffer + PrefixLen); - strncat(Head->FileName,Buffer,min(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(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(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(127,EOL-Buffer-1)); + strncpy(Head->Host,Buffer,min_t(unsigned int, 127,EOL-Buffer-1)); Buffer=EOL+1; continue; Index: security.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/khttpd/security.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- security.h 14 Jan 2001 17:17:05 -0000 1.1.1.1 +++ security.h 9 Apr 2002 16:29:01 -0000 1.2 @@ -9,4 +9,4 @@ char value[32-sizeof(void*)]; /* fill 1 cache-line */ }; -#endif \ No newline at end of file +#endif Index: waitheaders.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/net/khttpd/waitheaders.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- waitheaders.c 14 Jan 2001 17:17:08 -0000 1.1.1.1 +++ waitheaders.c 9 Apr 2002 16:29:01 -0000 1.2 @@ -244,7 +244,7 @@ Request->Time = Request->filp->f_dentry->d_inode->i_mtime; Request->IMS_Time = mimeTime_to_UnixTime(Request->IMS); sprintf(Request->LengthS,"%i",Request->FileLength); - time_Unix2RFC(min(Request->Time,CurrentTime_i),Request->TimeS); + time_Unix2RFC(min_t(unsigned int, Request->Time,CurrentTime_i),Request->TimeS); /* The min() is required by rfc1945, section 10.10: It is not allowed to send a filetime in the future */ |