summaryrefslogtreecommitdiff
path: root/main/reentrancy.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-01-03 01:22:58 -0800
committerStanislav Malyshev <stas@php.net>2015-01-10 15:07:38 -0800
commitb7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc (patch)
tree0e09490075ee4f9a75a77ef4168d8ee254c52e5b /main/reentrancy.c
parent773c8b0c092a0e9ad5c5548815bcb9991d54d5c1 (diff)
downloadphp-git-b7a7b1a624c97945c0aaa49d46ae996fc0bdb6bc.tar.gz
trailing whitespace removal
Diffstat (limited to 'main/reentrancy.c')
-rw-r--r--main/reentrancy.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/main/reentrancy.c b/main/reentrancy.c
index 4aca23eb1a..1df0f37b66 100644
--- a/main/reentrancy.c
+++ b/main/reentrancy.c
@@ -125,19 +125,19 @@ PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
#if !defined(HAVE_POSIX_READDIR_R)
-PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
+PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
struct dirent **result)
{
#if defined(HAVE_OLD_READDIR_R)
int ret = 0;
-
+
/* We cannot rely on the return value of readdir_r
as it differs between various platforms
(HPUX returns 0 on success whereas Solaris returns non-zero)
*/
entry->d_name[0] = '\0';
readdir_r(dirp, entry);
-
+
if (entry->d_name[0] == '\0') {
*result = NULL;
ret = errno;
@@ -150,11 +150,11 @@ PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
int ret = 0;
local_lock(READDIR_R);
-
+
errno = 0;
-
+
ptr = readdir(dirp);
-
+
if (!ptr && errno != 0)
ret = errno;
@@ -176,7 +176,7 @@ PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
{
struct tm *tmp;
-
+
local_lock(LOCALTIME_R);
tmp = localtime(timep);
@@ -184,7 +184,7 @@ PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
memcpy(p_tm, tmp, sizeof(struct tm));
tmp = p_tm;
}
-
+
local_unlock(LOCALTIME_R);
return tmp;
@@ -197,14 +197,14 @@ PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm)
PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
{
char *tmp;
-
+
local_lock(CTIME_R);
tmp = ctime(clock);
strcpy(buf, tmp);
local_unlock(CTIME_R);
-
+
return buf;
}
@@ -215,7 +215,7 @@ PHPAPI char *php_ctime_r(const time_t *clock, char *buf)
PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
{
char *tmp;
-
+
local_lock(ASCTIME_R);
tmp = asctime(tm);
@@ -233,7 +233,7 @@ PHPAPI char *php_asctime_r(const struct tm *tm, char *buf)
PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
{
struct tm *tmp;
-
+
local_lock(GMTIME_R);
tmp = gmtime(timep);
@@ -241,7 +241,7 @@ PHPAPI struct tm *php_gmtime_r(const time_t *const timep, struct tm *p_tm)
memcpy(p_tm, tmp, sizeof(struct tm));
tmp = p_tm;
}
-
+
local_unlock(GMTIME_R);
return tmp;
@@ -346,11 +346,11 @@ php_rand_r(unsigned int *ctx)
*
* 1. Redistributions of source code must retain the above copyright
* notices, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notices, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*