diff options
| author | Sascha Schumann <sas@php.net> | 2002-11-06 17:59:03 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2002-11-06 17:59:03 +0000 |
| commit | 3037b35b31a55d4a693a7ace1aa7138bccb524a3 (patch) | |
| tree | a11dba457541e5a443e59a44d670513cdfb3339c /ext/dba/dba.c | |
| parent | 10a861f93c9642f4aefc3ccf36ce7c8d8309d5ef (diff) | |
| download | php-git-3037b35b31a55d4a693a7ace1aa7138bccb524a3.tar.gz | |
emalloc never returns 0, so we can simplify the code paths.
also replace ecalloc with emalloc+memset, so that the latter can be inlined.
Diffstat (limited to 'ext/dba/dba.c')
| -rw-r--r-- | ext/dba/dba.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dba/dba.c b/ext/dba/dba.c index d68a291f57..8213166afd 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -369,12 +369,12 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) RETURN_FALSE; } - info = ecalloc(sizeof(dba_info), 1); + info = emalloc(sizeof(dba_info)); + memset(info, 0, sizeof(dba_info)); info->path = estrdup(Z_STRVAL_PP(args[0])); info->mode = modenr; info->argc = ac - 3; info->argv = args + 3; - /* info->hnd is NULL here */ if (hptr->open(info, &error TSRMLS_CC) != SUCCESS) { dba_close(info TSRMLS_CC); |
