Skip to content

Commit c05cbad

Browse files
Kraemiinichtsfrei
authored andcommitted
Fix: define LOG_REFERENCES_AVAILABLE in header
Must be defined in the header to apply to applications using this library, when build in release mode.
1 parent 573ec74 commit c05cbad

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

base/logging.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@
4848
*/
4949
#define G_LOG_DOMAIN "libgvm base"
5050

51-
/**
52-
* @brief for backward compatibility
53-
*
54-
*/
55-
#define LOG_REFERENCES_AVAILABLE
56-
5751
/**
5852
* @struct gvm_logging_t
5953
* @brief Logging stores the parameters loaded from a log configuration
@@ -581,7 +575,7 @@ gvm_log_func (const char *log_domain, GLogLevelFlags log_level,
581575
/* If the current char is a % and the next one is a p, get the pid. */
582576
if ((*tmp == '%') && (*(tmp + 1) == 'p'))
583577
{
584-
if (reference != NULL)
578+
if (reference)
585579
{
586580
prepend_tmp =
587581
g_strdup_printf ("%s%d%s%s", prepend_buf, (int) getpid (),

base/logging.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727

2828
#include <glib.h> /* for GSList, gchar, GLogLevelFlags, gpointer */
2929

30+
/**
31+
* @brief for backward compatibility
32+
*
33+
*/
34+
#define LOG_REFERENCES_AVAILABLE
35+
3036
GSList *
3137
load_log_configuration (gchar *);
3238

0 commit comments

Comments
 (0)