From aaf7299b2d90878b2f5cf9ad28f6b0c5e5696422 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Fri, 2 Apr 2010 17:49:39 +0200 Subject: [PATCH] Let INGgetisnull return an bool --- 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 c222928991..227464b0ee 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; } -int INGgetisnull(INGresult *res, int row_number, int column_number) +bool 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) ? 1 : 0; + return (*res->act_row->sqlvar[column_number].sqlind == -1) ? true : false; } int INGntuples(const INGresult *res) { diff --git a/bacula/src/cats/myingres.h b/bacula/src/cats/myingres.h index d867fc9a6b..45899b8c84 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); -int INGgetisnull(INGresult *res, int row_number, int column_number); +bool 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 43dfc58de6..2ea172a5a6 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; } -int INGgetisnull(INGresult *res, int row_number, int column_number) +bool 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) ? 1 : 0; + return (*res->act_row->sqlvar[column_number].sqlind == -1) ? true : false; } int INGntuples(const INGresult *res) diff --git a/bacula/src/cats/myingres.sh b/bacula/src/cats/myingres.sh index f96b340951..f3a1a2da4a 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); -int INGgetisnull(INGresult *res, int row_number, int column_number); +bool 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