helly           Tue Nov 12 07:01:59 2002 EDT

  Modified files:              
    /php4/ext/db        db.c 
  Log:
  -fix includes
  -fix one missing efree
  -replace efree/emalloc with erealloc
  
  
Index: php4/ext/db/db.c
diff -u php4/ext/db/db.c:1.79 php4/ext/db/db.c:1.80
--- php4/ext/db/db.c:1.79       Tue Oct 22 14:47:41 2002
+++ php4/ext/db/db.c    Tue Nov 12 07:01:57 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: db.c,v 1.79 2002/10/22 18:47:41 helly Exp $ */
+/* $Id: db.c,v 1.80 2002/11/12 12:01:57 helly Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -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 @@
                        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 @@
                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);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to