summaryrefslogtreecommitdiff
path: root/ext/posix
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-04-15 15:40:40 +0400
committerDmitry Stogov <dmitry@zend.com>2014-04-15 15:40:40 +0400
commit050d7e38ad4163e7fa65e26724d3516ce7b33601 (patch)
tree2bb49b1b73c37b35fc778e83d9353f0eb9cc12a3 /ext/posix
parent93d3a613d82d32dd6f5499e211bfe194d60898b0 (diff)
downloadphp-git-050d7e38ad4163e7fa65e26724d3516ce7b33601.tar.gz
Cleanup (1-st round)
Diffstat (limited to 'ext/posix')
-rw-r--r--ext/posix/posix.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 1dfa9997ed..64ef62742e 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -626,14 +626,14 @@ PHP_FUNCTION(posix_uname)
array_init(return_value);
- add_assoc_string(return_value, "sysname", u.sysname, 1);
- add_assoc_string(return_value, "nodename", u.nodename, 1);
- add_assoc_string(return_value, "release", u.release, 1);
- add_assoc_string(return_value, "version", u.version, 1);
- add_assoc_string(return_value, "machine", u.machine, 1);
+ add_assoc_string(return_value, "sysname", u.sysname);
+ add_assoc_string(return_value, "nodename", u.nodename);
+ add_assoc_string(return_value, "release", u.release);
+ add_assoc_string(return_value, "version", u.version);
+ add_assoc_string(return_value, "machine", u.machine);
#if defined(_GNU_SOURCE) && !defined(DARWIN) && defined(HAVE_UTSNAME_DOMAINNAME)
- add_assoc_string(return_value, "domainname", u.domainname, 1);
+ add_assoc_string(return_value, "domainname", u.domainname);
#endif
}
/* }}} */
@@ -925,10 +925,10 @@ int php_posix_group_to_array(struct group *g, zval *array_group) /* {{{ */
MAKE_STD_ZVAL(array_members);
array_init(array_members);
- add_assoc_string(array_group, "name", g->gr_name, 1);
- add_assoc_string(array_group, "passwd", g->gr_passwd, 1);
+ add_assoc_string(array_group, "name", g->gr_name);
+ add_assoc_string(array_group, "passwd", g->gr_passwd);
for (count=0; g->gr_mem[count] != NULL; count++) {
- add_next_index_string(array_members, g->gr_mem[count], 1);
+ add_next_index_string(array_members, g->gr_mem[count]);
}
zend_hash_update(Z_ARRVAL_P(array_group), "members", sizeof("members"), (void*)&array_members, sizeof(zval*), NULL);
add_assoc_long(array_group, "gid", g->gr_gid);
@@ -1094,13 +1094,13 @@ int php_posix_passwd_to_array(struct passwd *pw, zval *return_value) /* {{{ */
if (NULL == return_value || Z_TYPE_P(return_value) != IS_ARRAY)
return 0;
- add_assoc_string(return_value, "name", pw->pw_name, 1);
- add_assoc_string(return_value, "passwd", pw->pw_passwd, 1);
+ add_assoc_string(return_value, "name", pw->pw_name);
+ add_assoc_string(return_value, "passwd", pw->pw_passwd);
add_assoc_long (return_value, "uid", pw->pw_uid);
add_assoc_long (return_value, "gid", pw->pw_gid);
- add_assoc_string(return_value, "gecos", pw->pw_gecos, 1);
- add_assoc_string(return_value, "dir", pw->pw_dir, 1);
- add_assoc_string(return_value, "shell", pw->pw_shell, 1);
+ add_assoc_string(return_value, "gecos", pw->pw_gecos);
+ add_assoc_string(return_value, "dir", pw->pw_dir);
+ add_assoc_string(return_value, "shell", pw->pw_shell);
return 1;
}
/* }}} */
@@ -1227,13 +1227,13 @@ static int posix_addlimit(int limit, char *name, zval *return_value TSRMLS_DC) {
}
if (rl.rlim_cur == RLIM_INFINITY) {
- add_assoc_stringl(return_value, soft, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1, 1);
+ add_assoc_stringl(return_value, soft, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1);
} else {
add_assoc_long(return_value, soft, rl.rlim_cur);
}
if (rl.rlim_max == RLIM_INFINITY) {
- add_assoc_stringl(return_value, hard, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1, 1);
+ add_assoc_stringl(return_value, hard, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1);
} else {
add_assoc_long(return_value, hard, rl.rlim_max);
}