diff options
Diffstat (limited to 'pr/src/io')
-rw-r--r-- | pr/src/io/prdir.c | 18 | ||||
-rw-r--r-- | pr/src/io/prfdcach.c | 4 | ||||
-rw-r--r-- | pr/src/io/prfile.c | 118 | ||||
-rw-r--r-- | pr/src/io/prio.c | 2 | ||||
-rw-r--r-- | pr/src/io/priometh.c | 36 | ||||
-rw-r--r-- | pr/src/io/pripv6.c | 4 | ||||
-rw-r--r-- | pr/src/io/prlayer.c | 2 | ||||
-rw-r--r-- | pr/src/io/prlog.c | 2 | ||||
-rw-r--r-- | pr/src/io/prmapopt.c | 4 | ||||
-rw-r--r-- | pr/src/io/prmwait.c | 22 | ||||
-rw-r--r-- | pr/src/io/prpolevt.c | 44 | ||||
-rw-r--r-- | pr/src/io/prprf.c | 10 | ||||
-rw-r--r-- | pr/src/io/prscanf.c | 8 | ||||
-rw-r--r-- | pr/src/io/prsocket.c | 84 |
14 files changed, 179 insertions, 179 deletions
diff --git a/pr/src/io/prdir.c b/pr/src/io/prdir.c index 3701a6a4..e1e19625 100644 --- a/pr/src/io/prdir.c +++ b/pr/src/io/prdir.c @@ -85,7 +85,7 @@ PRInt32 rv; * UTF16 Interface */ PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name) -{ +{ PRDirUTF16 *dir; PRStatus sts; @@ -100,10 +100,10 @@ PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name) PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); } return dir; -} - +} + PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags) -{ +{ /* * _MD_READ_DIR_UTF16 return a PRUnichar* to the name; allocation in * machine-dependent code @@ -111,11 +111,11 @@ PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags PRUnichar* name = _PR_MD_READ_DIR_UTF16(&dir->md, flags); dir->d.name = name; return name ? &dir->d : NULL; -} - +} + PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir) -{ - PRInt32 rv; +{ + PRInt32 rv; if (dir) { rv = _PR_MD_CLOSE_DIR_UTF16(&dir->md); @@ -124,7 +124,7 @@ PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir) return PR_FAILURE; else return PR_SUCCESS; - } + } return PR_SUCCESS; } diff --git a/pr/src/io/prfdcach.c b/pr/src/io/prfdcach.c index 17b71fe6..255f4632 100644 --- a/pr/src/io/prfdcach.c +++ b/pr/src/io/prfdcach.c @@ -160,7 +160,7 @@ PR_IMPLEMENT(PRStatus) PR_SetFDCacheSize(PRIntn low, PRIntn high) if (!_pr_initialized) _PR_ImplicitInitialization(); if (low > high) low = high; /* sanity check the params */ - + PR_Lock(_pr_fd_cache.ml); _pr_fd_cache.limit_high = high; _pr_fd_cache.limit_low = low; @@ -179,7 +179,7 @@ void _PR_InitFdCache(void) const char *low = PR_GetEnv("NSPR_FD_CACHE_SIZE_LOW"); const char *high = PR_GetEnv("NSPR_FD_CACHE_SIZE_HIGH"); - /* + /* ** _low is allowed to be zero, _high is not. ** If _high is zero, we're not doing the caching. */ diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c index 7189fd68..d31e446b 100644 --- a/pr/src/io/prfile.c +++ b/pr/src/io/prfile.c @@ -148,14 +148,14 @@ static PRInt32 PR_CALLBACK PipeAvailable(PRFileDesc *fd) { PRInt32 rv; rv = _PR_MD_PIPEAVAILABLE(fd); - return rv; + return rv; } static PRInt64 PR_CALLBACK PipeAvailable64(PRFileDesc *fd) { PRInt64 rv; LL_I2L(rv, _PR_MD_PIPEAVAILABLE(fd)); - return rv; + return rv; } static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd) @@ -232,30 +232,30 @@ static PRIOMethods _pr_fileMethods = { FileSeek64, FileGetInfo, FileGetInfo64, - (PRWritevFN)_PR_InvalidInt, - (PRConnectFN)_PR_InvalidStatus, - (PRAcceptFN)_PR_InvalidDesc, - (PRBindFN)_PR_InvalidStatus, - (PRListenFN)_PR_InvalidStatus, - (PRShutdownFN)_PR_InvalidStatus, - (PRRecvFN)_PR_InvalidInt, - (PRSendFN)_PR_InvalidInt, - (PRRecvfromFN)_PR_InvalidInt, - (PRSendtoFN)_PR_InvalidInt, - FilePoll, - (PRAcceptreadFN)_PR_InvalidInt, - (PRTransmitfileFN)_PR_InvalidInt, - (PRGetsocknameFN)_PR_InvalidStatus, - (PRGetpeernameFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRGetsocketoptionFN)_PR_InvalidStatus, + (PRWritevFN)_PR_InvalidInt, + (PRConnectFN)_PR_InvalidStatus, + (PRAcceptFN)_PR_InvalidDesc, + (PRBindFN)_PR_InvalidStatus, + (PRListenFN)_PR_InvalidStatus, + (PRShutdownFN)_PR_InvalidStatus, + (PRRecvFN)_PR_InvalidInt, + (PRSendFN)_PR_InvalidInt, + (PRRecvfromFN)_PR_InvalidInt, + (PRSendtoFN)_PR_InvalidInt, + FilePoll, + (PRAcceptreadFN)_PR_InvalidInt, + (PRTransmitfileFN)_PR_InvalidInt, + (PRGetsocknameFN)_PR_InvalidStatus, + (PRGetpeernameFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRGetsocketoptionFN)_PR_InvalidStatus, (PRSetsocketoptionFN)_PR_InvalidStatus, - (PRSendfileFN)_PR_InvalidInt, - (PRConnectcontinueFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRSendfileFN)_PR_InvalidInt, + (PRConnectcontinueFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt }; @@ -276,30 +276,30 @@ static PRIOMethods _pr_pipeMethods = { (PRSeek64FN)_PR_InvalidInt64, (PRFileInfoFN)_PR_InvalidStatus, (PRFileInfo64FN)_PR_InvalidStatus, - (PRWritevFN)_PR_InvalidInt, - (PRConnectFN)_PR_InvalidStatus, - (PRAcceptFN)_PR_InvalidDesc, - (PRBindFN)_PR_InvalidStatus, - (PRListenFN)_PR_InvalidStatus, - (PRShutdownFN)_PR_InvalidStatus, - (PRRecvFN)_PR_InvalidInt, - (PRSendFN)_PR_InvalidInt, - (PRRecvfromFN)_PR_InvalidInt, - (PRSendtoFN)_PR_InvalidInt, - FilePoll, - (PRAcceptreadFN)_PR_InvalidInt, - (PRTransmitfileFN)_PR_InvalidInt, - (PRGetsocknameFN)_PR_InvalidStatus, - (PRGetpeernameFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRGetsocketoptionFN)_PR_InvalidStatus, + (PRWritevFN)_PR_InvalidInt, + (PRConnectFN)_PR_InvalidStatus, + (PRAcceptFN)_PR_InvalidDesc, + (PRBindFN)_PR_InvalidStatus, + (PRListenFN)_PR_InvalidStatus, + (PRShutdownFN)_PR_InvalidStatus, + (PRRecvFN)_PR_InvalidInt, + (PRSendFN)_PR_InvalidInt, + (PRRecvfromFN)_PR_InvalidInt, + (PRSendtoFN)_PR_InvalidInt, + FilePoll, + (PRAcceptreadFN)_PR_InvalidInt, + (PRTransmitfileFN)_PR_InvalidInt, + (PRGetsocknameFN)_PR_InvalidStatus, + (PRGetpeernameFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRGetsocketoptionFN)_PR_InvalidStatus, (PRSetsocketoptionFN)_PR_InvalidStatus, - (PRSendfileFN)_PR_InvalidInt, - (PRConnectcontinueFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRSendfileFN)_PR_InvalidInt, + (PRConnectcontinueFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt }; @@ -399,7 +399,7 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size) struct rlimit rlim; PRInt32 tableMax = PR_GetSysfdTableMax(); - if (tableMax < 0) + if (tableMax < 0) return -1; if (tableMax > FD_SETSIZE) @@ -428,7 +428,7 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size) return table_size; else return -1; - } + } return tableMax; #elif defined(AIX) || defined(QNX) \ || defined(WIN32) || defined(WIN16) @@ -497,7 +497,7 @@ PRInt32 rv; } /* -** Import an existing OS file to NSPR +** Import an existing OS file to NSPR */ PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PROsfd osfd) { @@ -516,7 +516,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PROsfd osfd) } /* -** Import an existing OS pipe to NSPR +** Import an existing OS pipe to NSPR */ PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PROsfd osfd) { @@ -549,7 +549,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PROsfd osfd) * nspr 1.0. Therefore, it still uses the nspr 1.0 error-reporting * mechanism -- returns a PRInt32, which is the error code when the call * fails. - * + * * If we need this function in nspr 2.0, it should be changed to * return PRStatus, as follows: * @@ -604,7 +604,7 @@ PR_IMPLEMENT(PRStatus) PR_LockFile(PRFileDesc *fd) fd->secret->lockCount++; } PR_Unlock(_pr_flock_lock); - + return status; } @@ -642,7 +642,7 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRFileDesc *fd) PR_Lock(_pr_flock_lock); if (fd->secret->lockCount == 1) { rv = _PR_MD_UNLOCKFILE(fd->secret->md.osfd); - if (rv == PR_SUCCESS) + if (rv == PR_SUCCESS) fd->secret->lockCount = 0; } else { fd->secret->lockCount--; @@ -734,15 +734,15 @@ PR_IMPLEMENT(PRStatus) PR_CreatePipe( /* ================ UTF16 Interfaces ================================ */ PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF16( const PRUnichar *name, PRIntn flags, PRIntn mode) -{ +{ PROsfd osfd; PRFileDesc *fd = 0; #if !defined(_PR_HAVE_O_APPEND) PRBool appendMode = ( PR_APPEND & flags )? PR_TRUE : PR_FALSE; #endif - + if (!_pr_initialized) _PR_ImplicitInitialization(); - + /* Map pr open flags and mode to os specific flags */ osfd = _PR_MD_OPEN_FILE_UTF16(name, flags, mode); if (osfd != -1) { @@ -758,7 +758,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF16( } return fd; } - + PR_IMPLEMENT(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 *info) { PRInt32 rv; diff --git a/pr/src/io/prio.c b/pr/src/io/prio.c index b480f7f1..ffc66f1a 100644 --- a/pr/src/io/prio.c +++ b/pr/src/io/prio.c @@ -89,7 +89,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD osfd) PR_ASSERT((int) osfd >= PR_StandardInput && osfd <= PR_StandardError); if (!_pr_initialized) _PR_ImplicitInitialization(); - + switch (osfd) { case PR_StandardInput: result = _pr_stdin; break; diff --git a/pr/src/io/priometh.c b/pr/src/io/priometh.c index 4208767d..6ec5045f 100644 --- a/pr/src/io/priometh.c +++ b/pr/src/io/priometh.c @@ -22,26 +22,26 @@ PRIOMethods _pr_faulty_methods = { (PRSeek64FN)_PR_InvalidInt64, (PRFileInfoFN)_PR_InvalidStatus, (PRFileInfo64FN)_PR_InvalidStatus, - (PRWritevFN)_PR_InvalidInt, - (PRConnectFN)_PR_InvalidStatus, - (PRAcceptFN)_PR_InvalidDesc, - (PRBindFN)_PR_InvalidStatus, - (PRListenFN)_PR_InvalidStatus, - (PRShutdownFN)_PR_InvalidStatus, - (PRRecvFN)_PR_InvalidInt, - (PRSendFN)_PR_InvalidInt, - (PRRecvfromFN)_PR_InvalidInt, - (PRSendtoFN)_PR_InvalidInt, + (PRWritevFN)_PR_InvalidInt, + (PRConnectFN)_PR_InvalidStatus, + (PRAcceptFN)_PR_InvalidDesc, + (PRBindFN)_PR_InvalidStatus, + (PRListenFN)_PR_InvalidStatus, + (PRShutdownFN)_PR_InvalidStatus, + (PRRecvFN)_PR_InvalidInt, + (PRSendFN)_PR_InvalidInt, + (PRRecvfromFN)_PR_InvalidInt, + (PRSendtoFN)_PR_InvalidInt, (PRPollFN)_PR_InvalidInt16, - (PRAcceptreadFN)_PR_InvalidInt, - (PRTransmitfileFN)_PR_InvalidInt, - (PRGetsocknameFN)_PR_InvalidStatus, - (PRGetpeernameFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRAcceptreadFN)_PR_InvalidInt, + (PRTransmitfileFN)_PR_InvalidInt, + (PRGetsocknameFN)_PR_InvalidStatus, + (PRGetpeernameFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRGetsocketoptionFN)_PR_InvalidStatus, (PRSetsocketoptionFN)_PR_InvalidStatus, - (PRSendfileFN)_PR_InvalidInt, + (PRSendfileFN)_PR_InvalidInt, (PRConnectcontinueFN)_PR_InvalidStatus, (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt, @@ -299,7 +299,7 @@ PR_IMPLEMENT(PRInt32) PR_EmulateAcceptRead( * they are sent before and after the file, respectively. * * PR_TRANSMITFILE_CLOSE_SOCKET flag - close socket after sending file - * + * * return number of bytes sent or -1 on error * */ diff --git a/pr/src/io/pripv6.c b/pr/src/io/pripv6.c index a164ae7c..9f94ff4e 100644 --- a/pr/src/io/pripv6.c +++ b/pr/src/io/pripv6.c @@ -335,7 +335,7 @@ PR_IMPLEMENT(PRStatus) _pr_push_ipv6toipv4_layer(PRFileDesc *fd) return PR_FAILURE; /* - * For platforms with no support for IPv6 + * For platforms with no support for IPv6 * create layered socket for IPv4-mapped IPv6 addresses */ if (fd->methods->file_type == PR_DESC_SOCKET_TCP) @@ -346,7 +346,7 @@ PR_IMPLEMENT(PRStatus) _pr_push_ipv6toipv4_layer(PRFileDesc *fd) &ipv6_to_v4_udpMethods); if (NULL == ipv6_fd) { goto errorExit; - } + } ipv6_fd->secret = NULL; if (PR_PushIOLayer(fd, PR_TOP_IO_LAYER, ipv6_fd) == PR_FAILURE) { diff --git a/pr/src/io/prlayer.c b/pr/src/io/prlayer.c index 00da0287..26fc82ff 100644 --- a/pr/src/io/prlayer.c +++ b/pr/src/io/prlayer.c @@ -517,7 +517,7 @@ PR_IMPLEMENT(PRStatus) PR_PushIOLayer( if (stack == insert) { /* going on top of the stack */ - /* old-style stack */ + /* old-style stack */ PRFileDesc copy = *stack; *stack = *fd; *fd = copy; diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c index 6098460e..b4fe8f11 100644 --- a/pr/src/io/prlog.c +++ b/pr/src/io/prlog.c @@ -166,7 +166,7 @@ PRIntn strcasecmp(const char *a, const char *b) const unsigned char *ua = (const unsigned char *)a; const unsigned char *ub = (const unsigned char *)b; - if( ((const char *)0 == a) || (const char *)0 == b ) + if( ((const char *)0 == a) || (const char *)0 == b ) return (PRIntn)(a-b); while( (uc[*ua] == uc[*ub]) && ('\0' != *a) ) diff --git a/pr/src/io/prmapopt.c b/pr/src/io/prmapopt.c index 556001ea..262b00bb 100644 --- a/pr/src/io/prmapopt.c +++ b/pr/src/io/prmapopt.c @@ -173,7 +173,7 @@ PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionDat default: PR_NOT_REACHED("Unknown socket option"); break; - } + } } return rv; } /* _PR_SocketGetSocketOption */ @@ -305,7 +305,7 @@ PRStatus PR_CALLBACK _PR_SocketSetSocketOption(PRFileDesc *fd, const PRSocketOpt default: PR_NOT_REACHED("Unknown socket option"); break; - } + } } return rv; } /* _PR_SocketSetSocketOption */ diff --git a/pr/src/io/prmwait.c b/pr/src/io/prmwait.c index ab32fb5d..22ded763 100644 --- a/pr/src/io/prmwait.c +++ b/pr/src/io/prmwait.c @@ -81,7 +81,7 @@ static void TimerManager(void *arg) { timeout = (PRIntervalTime)(timer->absolute - now); PR_WaitCondVar(tm_vars.new_timer, timeout); - } + } } } PR_Unlock(tm_vars.ml); @@ -143,7 +143,7 @@ static PRBool CancelTimer(TimerEvent *timer) } PR_Unlock(tm_vars.ml); PR_DELETE(timer); - return canceled; + return canceled; } static PRStatus TimerInit(void) @@ -301,7 +301,7 @@ static _PR_HashStory MW_AddHashInternal(PRRecvWait *desc, _PRWaiterHash *hash) } hidx = (hidx + hoffset) % (hash->length); } - return _prmw_rehash; + return _prmw_rehash; } /* MW_AddHashInternal */ static _PR_HashStory MW_ExpandHashInternal(PRWaitGroup *group) @@ -408,7 +408,7 @@ static PRRecvWait **_MW_LookupInternal(PRWaitGroup *group, PRFileDesc *fd) _PRWaiterHash *hash = group->waiter; PRUintn hidx = _MW_HASH(fd, hash->length); PRUintn hoffset = 0; - + while (rehash-- > 0) { desc = (&hash->recv_wait) + hidx; @@ -520,7 +520,7 @@ static PRStatus _MW_PollInternal(PRWaitGroup *group) count += 1; } } - } + } PR_ASSERT(count == group->waiter->count); @@ -636,7 +636,7 @@ static void NT_TimeProc(void *arg) _MDOverlapped *overlapped = (_MDOverlapped *)arg; PRRecvWait *desc = overlapped->data.mw.desc; PRFileDesc *bottom; - + if (InterlockedCompareExchange((LONG *)&desc->outcome, (LONG)PR_MW_TIMEOUT, (LONG)PR_MW_PENDING) != (LONG)PR_MW_PENDING) { @@ -801,7 +801,7 @@ PR_IMPLEMENT(PRStatus) PR_AddWaitFileDesc( PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); return PR_FAILURE; } - hFile = (HANDLE)bottom->secret->md.osfd; + hFile = (HANDLE)bottom->secret->md.osfd; if (!bottom->secret->md.io_model_committed) { PRInt32 st; @@ -840,7 +840,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group) PRCList *io_ready = NULL; #ifdef WINNT PRThread *me = _PR_MD_CURRENT_THREAD(); - _MDOverlapped *overlapped; + _MDOverlapped *overlapped; #endif if (!_pr_initialized) _PR_ImplicitInitialization(); @@ -934,7 +934,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group) ** it is still full of if's with continue and goto. */ PRStatus st; - do + do { st = PR_WaitCondVar(group->io_complete, PR_INTERVAL_NO_TIMEOUT); if (_prmw_running != group->state) @@ -966,7 +966,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_WaitRecvReady(PRWaitGroup *group) ** i/o ready, it has a higher priority. I want to ** process the ready i/o first and wake up another ** thread to be the new poller. - */ + */ if (NULL == group->poller) { if (PR_CLIST_IS_EMPTY(&group->io_ready)) @@ -1395,7 +1395,7 @@ PR_IMPLEMENT(PRRecvWait*) PR_EnumerateWaitGroup( PRMWaitEnumerator *enumerator, const PRRecvWait *previous) { PRRecvWait *result = NULL; - + /* entry point sanity checking */ PR_ASSERT(NULL != enumerator); PR_ASSERT(_PR_ENUM_SEALED == enumerator->seal); diff --git a/pr/src/io/prpolevt.c b/pr/src/io/prpolevt.c index ac3eb101..352ca153 100644 --- a/pr/src/io/prpolevt.c +++ b/pr/src/io/prpolevt.c @@ -62,30 +62,30 @@ static PRIOMethods _pr_polevt_methods = { (PRSeek64FN)_PR_InvalidInt64, (PRFileInfoFN)_PR_InvalidStatus, (PRFileInfo64FN)_PR_InvalidStatus, - (PRWritevFN)_PR_InvalidInt, - (PRConnectFN)_PR_InvalidStatus, - (PRAcceptFN)_PR_InvalidDesc, - (PRBindFN)_PR_InvalidStatus, - (PRListenFN)_PR_InvalidStatus, - (PRShutdownFN)_PR_InvalidStatus, - (PRRecvFN)_PR_InvalidInt, - (PRSendFN)_PR_InvalidInt, - (PRRecvfromFN)_PR_InvalidInt, - (PRSendtoFN)_PR_InvalidInt, + (PRWritevFN)_PR_InvalidInt, + (PRConnectFN)_PR_InvalidStatus, + (PRAcceptFN)_PR_InvalidDesc, + (PRBindFN)_PR_InvalidStatus, + (PRListenFN)_PR_InvalidStatus, + (PRShutdownFN)_PR_InvalidStatus, + (PRRecvFN)_PR_InvalidInt, + (PRSendFN)_PR_InvalidInt, + (PRRecvfromFN)_PR_InvalidInt, + (PRSendtoFN)_PR_InvalidInt, _pr_PolEvtPoll, - (PRAcceptreadFN)_PR_InvalidInt, - (PRTransmitfileFN)_PR_InvalidInt, - (PRGetsocknameFN)_PR_InvalidStatus, - (PRGetpeernameFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRAcceptreadFN)_PR_InvalidInt, + (PRTransmitfileFN)_PR_InvalidInt, + (PRGetsocknameFN)_PR_InvalidStatus, + (PRGetpeernameFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRGetsocketoptionFN)_PR_InvalidStatus, (PRSetsocketoptionFN)_PR_InvalidStatus, - (PRSendfileFN)_PR_InvalidInt, - (PRConnectcontinueFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRSendfileFN)_PR_InvalidInt, + (PRConnectcontinueFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt }; @@ -130,7 +130,7 @@ PR_IMPLEMENT(PRFileDesc *) PR_NewPollableEvent(void) event = PR_CreateIOLayerStub(_pr_polevt_id, &_pr_polevt_methods); if (NULL == event) { goto errorExit; - } + } event->secret = PR_NEW(PRFilePrivate); if (event->secret == NULL) { PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); diff --git a/pr/src/io/prprf.c b/pr/src/io/prprf.c index 8475c771..82639d87 100644 --- a/pr/src/io/prprf.c +++ b/pr/src/io/prprf.c @@ -362,7 +362,7 @@ static int cvt_s(SprintfState *ss, const char *str, int width, int prec, /* Limit string length by precision value */ if (!str) { str = "(null)"; - } + } if (prec > 0) { /* this is: slen = strnlen(str, prec); */ register const char *s; @@ -391,7 +391,7 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc const char* p; char c; struct NumArg* nas; - + /* ** first pass: @@ -433,7 +433,7 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc return NULL; } - + if( number > NAS_DEFAULT_NUM ){ nas = (struct NumArg*)PR_MALLOC( number * sizeof( struct NumArg ) ); if( !nas ){ @@ -1075,7 +1075,7 @@ static int FuncStuff(SprintfState *ss, const char *sp, PRUint32 len) return 0; } -PR_IMPLEMENT(PRUint32) PR_sxprintf(PRStuffFunc func, void *arg, +PR_IMPLEMENT(PRUint32) PR_sxprintf(PRStuffFunc func, void *arg, const char *fmt, ...) { va_list ap; @@ -1087,7 +1087,7 @@ PR_IMPLEMENT(PRUint32) PR_sxprintf(PRStuffFunc func, void *arg, return rv; } -PR_IMPLEMENT(PRUint32) PR_vsxprintf(PRStuffFunc func, void *arg, +PR_IMPLEMENT(PRUint32) PR_vsxprintf(PRStuffFunc func, void *arg, const char *fmt, va_list ap) { SprintfState ss; diff --git a/pr/src/io/prscanf.c b/pr/src/io/prscanf.c index 4a200698..ebb33242 100644 --- a/pr/src/io/prscanf.c +++ b/pr/src/io/prscanf.c @@ -30,7 +30,7 @@ typedef int (*_PRGetCharFN)(void *stream); /* * A function that pushes the character 'ch' back to 'stream'. */ -typedef void (*_PRUngetCharFN)(void *stream, int ch); +typedef void (*_PRUngetCharFN)(void *stream, int ch); /* * The size specifier for the integer and floating point number @@ -89,7 +89,7 @@ typedef struct { * 'str' is assumed to be a representation of the integer in * base 'base'. * - * Warning: + * Warning: * - Only handle base 8, 10, and 16. * - No overflow checking. */ @@ -139,7 +139,7 @@ _pr_strtoull(const char *str, char **endptr, int base) cPtr += 2; } else { base = 8; - } + } } PR_ASSERT(base != 0); LL_I2L(base64, base); @@ -500,7 +500,7 @@ Convert(ScanfState *state, const char *fmt) } for (; state->width > 0; state->width--) { ch = GET(state); - if ((ch == EOF) + if ((ch == EOF) || (!complement && !memchr(cPtr, ch, n)) || (complement && memchr(cPtr, ch, n))) { UNGET(state, ch); diff --git a/pr/src/io/prsocket.c b/pr/src/io/prsocket.c index 8e7ce1f9..e2ffb1d6 100644 --- a/pr/src/io/prsocket.c +++ b/pr/src/io/prsocket.c @@ -796,7 +796,7 @@ static PRInt32 PR_CALLBACK SocketAvailable(PRFileDesc *fd) } #endif rv = _PR_MD_SOCKETAVAILABLE(fd); - return rv; + return rv; } static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd) @@ -809,7 +809,7 @@ static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd) } #endif LL_I2L(rv, _PR_MD_SOCKETAVAILABLE(fd)); - return rv; + return rv; } static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd) @@ -941,7 +941,7 @@ PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout) return rv; } -static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd, +static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout) { @@ -1001,7 +1001,7 @@ PRIntervalTime timeout) } #ifdef WINNT -PR_IMPLEMENT(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd, +PR_IMPLEMENT(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout) { @@ -1024,7 +1024,7 @@ PRIntervalTime timeout) if (raddr == NULL) { raddr = &raddrCopy; } - rv = _PR_MD_FAST_ACCEPT_READ(sd, &newSock, raddr, buf, amount, + rv = _PR_MD_FAST_ACCEPT_READ(sd, &newSock, raddr, buf, amount, timeout, PR_TRUE, NULL, NULL); if (rv < 0) { rv = -1; @@ -1053,7 +1053,7 @@ PRIntervalTime timeout) } PR_IMPLEMENT(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback( -PRFileDesc *sd, PRFileDesc **nd, +PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, _PR_AcceptTimeoutCallback callback, @@ -1154,7 +1154,7 @@ static PRInt32 PR_CALLBACK SocketSendFile( return rv; } -static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd, +static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd, const void *headers, PRInt32 hlen, PRTransmitFileFlags flags, PRIntervalTime timeout) { @@ -1260,11 +1260,11 @@ static PRIOMethods tcpMethods = { (PRReservedFN)_PR_InvalidInt, _PR_SocketGetSocketOption, _PR_SocketSetSocketOption, - SocketSendFile, + SocketSendFile, SocketConnectContinue, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt }; @@ -1299,11 +1299,11 @@ static PRIOMethods udpMethods = { (PRReservedFN)_PR_InvalidInt, _PR_SocketGetSocketOption, _PR_SocketSetSocketOption, - (PRSendfileFN)_PR_InvalidInt, - (PRConnectcontinueFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRSendfileFN)_PR_InvalidInt, + (PRConnectcontinueFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt }; @@ -1320,30 +1320,30 @@ static PRIOMethods socketpollfdMethods = { (PRSeek64FN)_PR_InvalidInt64, (PRFileInfoFN)_PR_InvalidStatus, (PRFileInfo64FN)_PR_InvalidStatus, - (PRWritevFN)_PR_InvalidInt, - (PRConnectFN)_PR_InvalidStatus, - (PRAcceptFN)_PR_InvalidDesc, - (PRBindFN)_PR_InvalidStatus, - (PRListenFN)_PR_InvalidStatus, - (PRShutdownFN)_PR_InvalidStatus, - (PRRecvFN)_PR_InvalidInt, - (PRSendFN)_PR_InvalidInt, - (PRRecvfromFN)_PR_InvalidInt, - (PRSendtoFN)_PR_InvalidInt, + (PRWritevFN)_PR_InvalidInt, + (PRConnectFN)_PR_InvalidStatus, + (PRAcceptFN)_PR_InvalidDesc, + (PRBindFN)_PR_InvalidStatus, + (PRListenFN)_PR_InvalidStatus, + (PRShutdownFN)_PR_InvalidStatus, + (PRRecvFN)_PR_InvalidInt, + (PRSendFN)_PR_InvalidInt, + (PRRecvfromFN)_PR_InvalidInt, + (PRSendtoFN)_PR_InvalidInt, SocketPoll, - (PRAcceptreadFN)_PR_InvalidInt, - (PRTransmitfileFN)_PR_InvalidInt, - (PRGetsocknameFN)_PR_InvalidStatus, - (PRGetpeernameFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRAcceptreadFN)_PR_InvalidInt, + (PRTransmitfileFN)_PR_InvalidInt, + (PRGetsocknameFN)_PR_InvalidStatus, + (PRGetpeernameFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRGetsocketoptionFN)_PR_InvalidStatus, (PRSetsocketoptionFN)_PR_InvalidStatus, - (PRSendfileFN)_PR_InvalidInt, - (PRConnectcontinueFN)_PR_InvalidStatus, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, - (PRReservedFN)_PR_InvalidInt, + (PRSendfileFN)_PR_InvalidInt, + (PRConnectcontinueFN)_PR_InvalidStatus, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, + (PRReservedFN)_PR_InvalidInt, (PRReservedFN)_PR_InvalidInt }; @@ -1430,7 +1430,7 @@ PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) #endif #if defined(_PR_INET6_PROBE) || !defined(_PR_INET6) /* - * For platforms with no support for IPv6 + * For platforms with no support for IPv6 * create layered socket for IPv4-mapped IPv6 addresses */ if (PR_AF_INET6 == tmp_domain && PR_AF_INET == domain) { @@ -1869,12 +1869,12 @@ out_of_memory: #endif /* !defined(NEED_SELECT) */ PR_IMPLEMENT(PRInt32) PR_Select( - PRInt32 unused, PR_fd_set *pr_rd, PR_fd_set *pr_wr, + PRInt32 unused, PR_fd_set *pr_rd, PR_fd_set *pr_wr, PR_fd_set *pr_ex, PRIntervalTime timeout) { #if !defined(NEED_SELECT) - PRInt32 npds = 0; + PRInt32 npds = 0; /* ** Find out how many fds are represented in the three lists. ** Then allocate a polling descriptor for the logical union @@ -1947,8 +1947,8 @@ PR_IMPLEMENT(PRInt32) PR_Select( return npds; out_of_memory: PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); - return -1; + return -1; #endif /* !defined(NEED_SELECT) */ - + } |