From 87a6e3c087fe6fd90a8f7736bd935e4311f9c056 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 10 Apr 2010 12:20:28 +0200 Subject: [PATCH] Revert "Let INGgetisnull return an bool" This reverts commit aaf7299b2d90878b2f5cf9ad28f6b0c5e5696422. --- bacula/src/cats/myingres.c | 4 ++-- bacula/src/cats/myingres.h | 2 +- bacula/src/cats/myingres.sc | 4 ++-- bacula/src/cats/myingres.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bacula/src/cats/myingres.c b/bacula/src/cats/myingres.c index 227464b0ee..c222928991 100644 --- a/bacula/src/cats/myingres.c +++ b/bacula/src/cats/myingres.c @@ -440,12 +440,12 @@ char *INGgetvalue(INGresult *res, int row_number, int column_number) } return res->act_row->sqlvar[column_number].sqldata; } -bool INGgetisnull(INGresult *res, int row_number, int column_number) +int INGgetisnull(INGresult *res, int row_number, int column_number) { if (row_number != res->act_row->row_number) { INGrowSeek(res, row_number); } - return (*res->act_row->sqlvar[column_number].sqlind == -1) ? true : false; + return (*res->act_row->sqlvar[column_number].sqlind == -1) ? 1 : 0; } int INGntuples(const INGresult *res) { diff --git a/bacula/src/cats/myingres.h b/bacula/src/cats/myingres.h index 45899b8c84..d867fc9a6b 100644 --- a/bacula/src/cats/myingres.h +++ b/bacula/src/cats/myingres.h @@ -73,7 +73,7 @@ typedef struct ing_conn { int INGcheck(void); short INGgetCols(B_DB *mdb, const char *stmt); char *INGgetvalue(INGresult *res, int row_number, int column_number); -bool INGgetisnull(INGresult *res, int row_number, int column_number); +int INGgetisnull(INGresult *res, int row_number, int column_number); int INGntuples(const INGresult *res); int INGnfields(const INGresult *res); char *INGfname(const INGresult *res, int column_number); diff --git a/bacula/src/cats/myingres.sc b/bacula/src/cats/myingres.sc index 2ea172a5a6..43dfc58de6 100644 --- a/bacula/src/cats/myingres.sc +++ b/bacula/src/cats/myingres.sc @@ -467,13 +467,13 @@ char *INGgetvalue(INGresult *res, int row_number, int column_number) return res->act_row->sqlvar[column_number].sqldata; } -bool INGgetisnull(INGresult *res, int row_number, int column_number) +int INGgetisnull(INGresult *res, int row_number, int column_number) { if (row_number != res->act_row->row_number) { INGrowSeek(res, row_number); } - return (*res->act_row->sqlvar[column_number].sqlind == -1) ? true : false; + return (*res->act_row->sqlvar[column_number].sqlind == -1) ? 1 : 0; } int INGntuples(const INGresult *res) diff --git a/bacula/src/cats/myingres.sh b/bacula/src/cats/myingres.sh index f3a1a2da4a..f96b340951 100644 --- a/bacula/src/cats/myingres.sh +++ b/bacula/src/cats/myingres.sh @@ -86,7 +86,7 @@ typedef struct ing_conn { int INGcheck(void); short INGgetCols(B_DB *mdb, const char *stmt); char *INGgetvalue(INGresult *res, int row_number, int column_number); -bool INGgetisnull(INGresult *res, int row_number, int column_number); +int INGgetisnull(INGresult *res, int row_number, int column_number); int INGntuples(const INGresult *res); int INGnfields(const INGresult *res); char *INGfname(const INGresult *res, int column_number); -- 2.39.5