From 84c6ec6f17c17749a45a132070e87484db52a30b Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 20 Aug 2018 12:42:00 +0200 Subject: 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 --- include/osmocom/sgsn/gprs_subscriber.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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__) -- cgit v1.2.3