diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-08-20 12:42:00 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-08-20 20:23:35 +0000 |
commit | 84c6ec6f17c17749a45a132070e87484db52a30b (patch) | |
tree | 926272b06a07ade20ea88911e6aca6076245e8cf /include | |
parent | c19817bce7747eaef03b1a2f4e7f9d0133836595 (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: Icdf7af7a31fbba9197b3711eaf102fc0ae333bcc
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/sgsn/gprs_subscriber.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/sgsn/gprs_subscriber.h b/include/osmocom/sgsn/gprs_subscriber.h index be78febff..d36db7500 100644 --- a/include/osmocom/sgsn/gprs_subscriber.h +++ b/include/osmocom/sgsn/gprs_subscriber.h @@ -27,5 +27,5 @@ struct gprs_subscr *_gprs_subscr_get(struct gprs_subscr *gsub, const char *file, int line); struct gprs_subscr *_gprs_subscr_put(struct gprs_subscr *gsub, const char *file, int line); -#define gprs_subscr_get(gsub) _gprs_subscr_get(gsub, __BASE_FILE__, __LINE__) -#define gprs_subscr_put(gsub) _gprs_subscr_put(gsub, __BASE_FILE__, __LINE__) +#define gprs_subscr_get(gsub) _gprs_subscr_get(gsub, __FILE__, __LINE__) +#define gprs_subscr_put(gsub) _gprs_subscr_put(gsub, __FILE__, __LINE__) |