diff options
author | Jerzi Kaminsky <JerziKaminsky@users.noreply.github.com> | 2017-04-16 12:07:43 +0300 |
---|---|---|
committer | Jerzi Kaminsky <JerziKaminsky@users.noreply.github.com> | 2017-04-16 16:39:53 +0300 |
commit | 709b53bd4347ee0ba4925ae02a5f89ca15f380c8 (patch) | |
tree | fcce54a1332d699fb5ecaef85b5fba70066713de /common | |
parent | Fix variadic forwarding in sway_assert (diff) | |
download | sway-709b53bd4347ee0ba4925ae02a5f89ca15f380c8.tar.gz sway-709b53bd4347ee0ba4925ae02a5f89ca15f380c8.tar.zst sway-709b53bd4347ee0ba4925ae02a5f89ca15f380c8.zip |
Fix location reported by sway_assert
Diffstat (limited to 'common')
-rw-r--r-- | common/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/log.c b/common/log.c index 23b756eb..8e5b71f9 100644 --- a/common/log.c +++ b/common/log.c | |||
@@ -142,14 +142,14 @@ void sway_log_errno(log_importance_t verbosity, char* format, ...) { | |||
142 | } | 142 | } |
143 | } | 143 | } |
144 | 144 | ||
145 | bool _sway_assert(bool condition, const char* format, ...) { | 145 | bool _sway_assert(bool condition, const char *filename, int line, const char* format, ...) { |
146 | if (condition) { | 146 | if (condition) { |
147 | return true; | 147 | return true; |
148 | } | 148 | } |
149 | 149 | ||
150 | va_list args; | 150 | va_list args; |
151 | va_start(args, format); | 151 | va_start(args, format); |
152 | sway_vlog(L_ERROR, format, args); | 152 | _sway_vlog(filename, line, L_ERROR, format, args); |
153 | va_end(args); | 153 | va_end(args); |
154 | 154 | ||
155 | #ifndef NDEBUG | 155 | #ifndef NDEBUG |