]> granicus.if.org Git - php/commitdiff
My bad. Left some stray debugging code in previous commit.
authorGavin Sherry <swm@php.net>
Sat, 12 Jan 2002 07:38:35 +0000 (07:38 +0000)
committerGavin Sherry <swm@php.net>
Sat, 12 Jan 2002 07:38:35 +0000 (07:38 +0000)
ext/dba/dba_db2.c

index 37973ed3f932b913760b09e784125afcda3696e3..bbe729a0b60907ee2227460d84d8c72b1a670f78 100644 (file)
@@ -47,8 +47,8 @@ DBA_OPEN_FUNC(db2)
        int gmode = 0;
        int filemode = 0644;
        struct stat check_stat;
-       int ret;
        int s = VCWD_STAT(info->path, &check_stat);
+
        type =  info->mode == DBA_READER ? DB_UNKNOWN :
                info->mode == DBA_TRUNC ? DB_BTREE :
                s ? DB_BTREE : DB_UNKNOWN;
@@ -67,13 +67,11 @@ DBA_OPEN_FUNC(db2)
                filemode = Z_LVAL_PP(info->argv[0]);
        }
 
-       if(!(ret = db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp))) {
+       if(db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
                info->dbf = malloc(sizeof(dba_db2_data));
                memset(info->dbf, 0, sizeof(dba_db2_data));
                ((dba_db2_data *) info->dbf)->dbp = dbp;
                return SUCCESS;
-       } else {
-               printf("Failed: type = %i\ngmode = %i\n%s\n",type,gmode,strerror(ret));
        }
        return FAILURE;
 }