Commit c7dea3a6 authored by Bruce Momjian's avatar Bruce Momjian

Correctly return -1 on error to CmdTuples()

Vince.
parent db3c4c3a
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.7 1999/10/06 03:00:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.8 1999/10/13 16:46:28 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -66,7 +66,7 @@ int PgDatabase::CmdTuples() ...@@ -66,7 +66,7 @@ int PgDatabase::CmdTuples()
char *a; char *a;
a = (char *)PQcmdTuples(pgResult); a = (char *)PQcmdTuples(pgResult);
if(NULL == a) return -1; if(!a[0]) return -1;
return atoi(a); return atoi(a);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment