From b93f00b92f20dcdc5360605649a142551bd837a9 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 21 Jun 2017 14:15:06 -0400 Subject: Utilize wlr_log in example logging --- util/log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/log.c b/util/log.c index 760ef18a..57cf24f7 100644 --- a/util/log.c +++ b/util/log.c @@ -66,12 +66,12 @@ void _wlr_log(log_importance_t verbosity, const char *fmt, ...) { // 'backend/wayland/backend.c' const char *_strip_path(const char *filepath) { static int srclen = strlen(WLR_SRC_DIR) + 1; - if(*filepath == '.') { - while(*filepath == '.' || *filepath == '/') { + if (strstr(filepath, WLR_SRC_DIR) == filepath) { + filepath += srclen; + } else if (*filepath == '.') { + while (*filepath == '.' || *filepath == '/') { ++filepath; } - } else { - filepath += srclen; } return filepath; } -- cgit v1.2.3