From: Michal Rakowski Date: Fri, 6 Nov 2020 06:57:31 +0000 (+0100) Subject: move 'append_filter' catalog helper to more common place X-Git-Tag: Release-11.3.2~859 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dc516ab66aea859c9f7efdcfe2e5de4e399360a;p=thirdparty%2Fbacula.git move 'append_filter' catalog helper to more common place --- diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index d50867cad..2c0b9345b 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -69,6 +69,16 @@ typedef enum { SQL_DRIVER_TYPE_DBI = 3 } SQL_DRIVER; +#define append_filter(buf, sql) \ + do { \ + if (*buf) { \ + pm_strcat(buf, " AND ");\ + } else { \ + pm_strcpy(buf, " WHERE ");\ + } \ + pm_strcat(buf, sql); \ + } while (0) + /* ============================================================== * diff --git a/bacula/src/cats/sql_list.c b/bacula/src/cats/sql_list.c index 8354fbbdf..f2529d0d0 100644 --- a/bacula/src/cats/sql_list.c +++ b/bacula/src/cats/sql_list.c @@ -36,16 +36,6 @@ * ----------------------------------------------------------------------- */ -#define append_filter(buf, sql) \ - do { \ - if (*buf) { \ - pm_strcat(buf, " AND ");\ - } else { \ - pm_strcpy(buf, " WHERE ");\ - } \ - pm_strcat(buf, sql); \ - } while (0) - /* * Submit general SQL query */