diff options
| author | Marcus Boerger <helly@php.net> | 2002-11-12 12:01:57 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2002-11-12 12:01:57 +0000 |
| commit | 99beb8034ed51f66971e3a884147630be7e57322 (patch) | |
| tree | 5c13d5e37f5eafc545e1bfba735af0df302df6ff | |
| parent | 597acbc3d33ea13e8d6ffc32a2256d108fb7752f (diff) | |
| download | php-git-99beb8034ed51f66971e3a884147630be7e57322.tar.gz | |
-fix includes
-fix one missing efree
-replace efree/emalloc with erealloc
| -rw-r--r-- | ext/db/db.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ext/db/db.c b/ext/db/db.c index 9baa2ead79..b5ad344a12 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -38,15 +38,9 @@ #include <unistd.h> #endif -#ifdef PHP_31 -#include "os/nt/flock.h" -#else -#ifdef PHP_WIN32 -#include "win32/flock.h" -#else +#ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif -#endif #if HAVE_FCNTL_H #include <fcntl.h> @@ -954,7 +948,7 @@ datum flatfile_fetch(FILE *dbf, datum key_datum) { num = atoi(buf); if (num > buf_size) { buf_size+=num; - buf = emalloc((buf_size+1)*sizeof(char)); + buf = erealloc(buf, (buf_size+1)*sizeof(char)); } read(fileno(dbf), buf, num); value_datum.dptr = buf; @@ -985,8 +979,7 @@ int flatfile_delete(FILE *dbf, datum key_datum) { num = atoi(buf); if (num > buf_size) { buf_size += num; - if (buf) efree(buf); - buf = emalloc((buf_size+1)*sizeof(char)); + buf = erealloc(buf, (buf_size+1)*sizeof(char)); } pos = ftell(dbf); |
