Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c7dea3a

Browse files
committed
Correctly return -1 on error to CmdTuples()
Vince.
1 parent db3c4c3 commit c7dea3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq++/pgdatabase.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.7 1999/10/06 03:00:16 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.8 1999/10/13 16:46:28 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -66,7 +66,7 @@ int PgDatabase::CmdTuples()
6666
char *a;
6767

6868
a = (char *)PQcmdTuples(pgResult);
69-
if(NULL == a) return -1;
69+
if(!a[0]) return -1;
7070

7171
return atoi(a);
7272
}

0 commit comments

Comments
 (0)