From: Marco van Wieringen Date: Thu, 1 Apr 2010 18:55:55 +0000 (+0200) Subject: Make some static functions inline as they only are called once and are there mostly... X-Git-Tag: Release-5.0.2~131 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4d6483e392466a6c28b50ebf98860b16dc09e48f;p=bacula%2Fbacula Make some static functions inline as they only are called once and are there mostly to describe a functional method. --- diff --git a/bacula/src/cats/myingres.sc b/bacula/src/cats/myingres.sc index 13eeee684e..1289f13eed 100644 --- a/bacula/src/cats/myingres.sc +++ b/bacula/src/cats/myingres.sc @@ -54,7 +54,7 @@ short INGgetCols(const char *query) return number; } -static IISQLDA *INGgetDescriptor(short numCols, const char *query) +static inline IISQLDA *INGgetDescriptor(short numCols, const char *query) { EXEC SQL BEGIN DECLARE SECTION; char *stmt; @@ -131,7 +131,7 @@ static void INGfreeDescriptor(IISQLDA *sqlda) sqlda = NULL; } -static int INGgetTypeSize(IISQLVAR *ingvar) +static inline int INGgetTypeSize(IISQLVAR *ingvar) { int inglength = 0; @@ -153,7 +153,7 @@ static int INGgetTypeSize(IISQLVAR *ingvar) return inglength; } -static INGresult *INGgetINGresult(IISQLDA *sqlda) +static inline INGresult *INGgetINGresult(IISQLDA *sqlda) { if (!sqlda) { return NULL; @@ -222,7 +222,7 @@ static void INGfreeINGresult(INGresult *ing_res) ing_res = NULL; } -static ING_ROW *INGgetRowSpace(INGresult *ing_res) +static inline ING_ROW *INGgetRowSpace(INGresult *ing_res) { int i; unsigned short len; /* used for VARCHAR type length */ @@ -301,7 +301,7 @@ static ING_ROW *INGgetRowSpace(INGresult *ing_res) return row; } -static void INGfreeRowSpace(ING_ROW *row, IISQLDA *sqlda) +static inline void INGfreeRowSpace(ING_ROW *row, IISQLDA *sqlda) { int i; @@ -321,7 +321,7 @@ static void INGfreeRowSpace(ING_ROW *row, IISQLDA *sqlda) free(row); } -static int INGfetchAll(const char *query, INGresult *ing_res) +static inline int INGfetchAll(const char *query, INGresult *ing_res) { int linecount = 0; ING_ROW *row; @@ -369,10 +369,13 @@ static int INGfetchAll(const char *query, INGresult *ing_res) return linecount; } -static ING_STATUS INGresultStatus(INGresult *res) +static inline ING_STATUS INGresultStatus(INGresult *res) { - if (res == NULL) {return ING_NO_RESULT;} - return res->status; + if (res == NULL) { + return ING_NO_RESULT; + } else { + return res->status; + } } static void INGrowSeek(INGresult *res, int row_number)