summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-08-20 12:33:22 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-20 20:23:18 +0000
commit983dcb9af330a1a401e2d9e388183932f29b7bac (patch)
tree2687ce2345085519a28d3fdc15711103f4457bd0 /include/osmocom/gsm
parentb3a9820bfc0723626ba647d096f528aed14d7009 (diff)
use __FILE__, not __BASE_FILE__
The intention was to use the file's basename, but __BASE_FILE__ means "the root file that is being parsed and contains #include statements". If we had a function using __BASE_FILE__ and that was defined in an #included file, __BASE_FILE__ would indicate the first file where the #include is, and not the file where the function is defined. __BASE_FILE__ works for us because we don't ever include function definitions that log something, so __BASE_FILE__ always coincides with __FILE__ for our logging; but still __BASE_FILE__ is semantically the wrong constant. Related: OS#2740 Change-Id: Ibc1d3746f1876ac42d6b1faf0e5f83bd2283cdcc
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r--include/osmocom/gsm/mncc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index 6b94d469..7e7d12c3 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -90,7 +90,7 @@ void _osmo_mncc_log(int subsys, int level, const char *file, int line, const cha
const uint8_t *msg, unsigned int len);
#define osmo_mncc_log(ss, level, prefix, msg, len) \
- _osmo_mncc_log(ss, level, __BASE_FILE__, __LINE__, prefix, msg, len);
+ _osmo_mncc_log(ss, level, __FILE__, __LINE__, prefix, msg, len);
extern const struct value_string osmo_mncc_names[];
static inline const char *osmo_mncc_name(uint32_t msg_type) {