cvs: php4 /ext/dba dba_db2.c

From: Date: Sat, 12 Jan 2002 07:38:35 +0000
Subject: cvs: php4 /ext/dba dba_db2.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9046@lists.php.net to get a copy of this message
swm Sat Jan 12 02:38:35 2002 EDT Modified files: /php4/ext/dba dba_db2.c Log: My bad. Left some stray debugging code in previous commit. Index: php4/ext/dba/dba_db2.c diff -u php4/ext/dba/dba_db2.c:1.18 php4/ext/dba/dba_db2.c:1.19 --- php4/ext/dba/dba_db2.c:1.18 Sat Jan 12 02:23:35 2002 +++ php4/ext/dba/dba_db2.c Sat Jan 12 02:38:35 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db2.c,v 1.18 2002/01/12 07:23:35 swm Exp $ */ +/* $Id: dba_db2.c,v 1.19 2002/01/12 07:38:35 swm Exp $ */ #include "php.h" @@ -47,8 +47,8 @@ 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 @@ 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; }

« previous php.cvs (#9046) next »