summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2020-03-09 03:57:45 +0100
committerAllan McRae <allan@archlinux.org>2020-03-13 02:23:36 +0100
commitddd5b0a462e7beb0e086bb51184934868ded3525 (patch)
treea385c60ace652a285f2b2a2312b0b2ba68b88e14
parent80ae80149a956adec75df159f66a9cb88e91f5cc (diff)
downloadpacman-ddd5b0a462e7beb0e086bb51184934868ded3525.tar.gz
pacman-ddd5b0a462e7beb0e086bb51184934868ded3525.tar.xz
Add file and line number to RET_ERR{,_VOID}
Following the example of the recently added GOTO_ERR, adding the file and line number in addition to the function name in our debug messages is potentially useful. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 3aeb1b60..675eedec 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -62,12 +62,12 @@ void _alpm_alloc_fail(size_t size);
#define ASSERT(cond, action) do { if(!(cond)) { action; } } while(0)
#define RET_ERR_VOID(handle, err) do { \
- _alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerror(err)); \
+ _alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s (%s: %d) : %s\n", err, __func__, __FILE__, __LINE__, alpm_strerror(err)); \
(handle)->pm_errno = (err); \
return; } while(0)
#define RET_ERR(handle, err, ret) do { \
- _alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s : %s\n", err, __func__, alpm_strerror(err)); \
+ _alpm_log(handle, ALPM_LOG_DEBUG, "returning error %d from %s (%s: %d) : %s\n", err, __func__, __FILE__, __LINE__, alpm_strerror(err)); \
(handle)->pm_errno = (err); \
return (ret); } while(0)