diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-21 14:15:06 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-21 14:15:06 -0400 |
commit | b93f00b92f20dcdc5360605649a142551bd837a9 (patch) | |
tree | 29c730fd1c1779ec1f97a3e0fd4bab7f23fa8e7c /util | |
parent | 3d71969b2a66a029df88e0c6bbcb8d388d57a13c (diff) |
Utilize wlr_log in example logging
Diffstat (limited to 'util')
-rw-r--r-- | util/log.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |