[hackers] [scc] [cc1] adjust basename in tool name invocation check || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 3 Jun 2016 18:12:46 +0200 (CEST)

commit ba49f4826cbff550e63908fb67b144a7e56f1262
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri Jun 3 15:40:41 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Jun 3 18:10:23 2016 +0200

    [cc1] adjust basename in tool name invocation check

diff --git a/cc1/main.c b/cc1/main.c
index 82c78ec..9e542c7 100644
--- a/cc1/main.c
+++ b/cc1/main.c
_AT_@ -68,7 +68,9 @@ main(int argc, char *argv[])
                 usage();
 
         /* if run as cpp, only run the preprocessor */
- if (!(base = strrchr(argv0, '/')))
+ if ((base = strrchr(argv0, '/')))
+ ++base;
+ else
                 base = argv0;
         if (!strcmp(base, "cpp"))
                 onlycpp = 1;
Received on Fri Jun 03 2016 - 18:12:46 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 03 2016 - 18:24:17 CEST