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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy