]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Avoid "orig_args" parameters to separate them from the global variable
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 7 Aug 2012 15:05:13 +0000 (17:05 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 7 Aug 2012 15:05:13 +0000 (17:05 +0200)
ccache.c
ccache.h

index a547c0f6619d7bd89c738204c3814ecdf102c3ec..22c56e17e1ed73a1582617dadb46e7469665110d 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -196,7 +196,7 @@ enum fromcache_call_mode {
 static const char HASH_PREFIX[] = "3";
 
 static void
-add_prefix(struct args *orig_args)
+add_prefix(struct args *args)
 {
        char *e;
        char *tok, *saveptr = NULL;
@@ -226,7 +226,7 @@ add_prefix(struct args *orig_args)
 
        cc_log("Using command-line prefix %s", conf->prefix_command);
        for (i = prefix->argc; i != 0; i--) {
-               args_add_prefix(orig_args, prefix->argv[i-1]);
+               args_add_prefix(args, prefix->argv[i-1]);
        }
        args_free(prefix);
 }
@@ -1407,7 +1407,7 @@ is_precompiled_header(const char *path)
  * -E; this is added later. Returns true on success, otherwise false.
  */
 bool
-cc_process_args(struct args *orig_args, struct args **preprocessor_args,
+cc_process_args(struct args *args, struct args **preprocessor_args,
                 struct args **compiler_args)
 {
        int i;
@@ -1426,8 +1426,8 @@ cc_process_args(struct args *orig_args, struct args **preprocessor_args,
        /* is the dependency makefile target name specified with -MT or -MQ? */
        bool dependency_target_specified = false;
        struct args *stripped_args = NULL, *dep_args = NULL;
-       int argc = orig_args->argc;
-       char **argv = orig_args->argv;
+       int argc = args->argc;
+       char **argv = args->argv;
        bool result = true;
 
        stripped_args = args_init(0, NULL);
@@ -1467,10 +1467,10 @@ cc_process_args(struct args *orig_args, struct args **preprocessor_args,
                                goto out;
                        }
 
-                       args_insert(orig_args, i, file_args, true);
+                       args_insert(args, i, file_args, true);
 
-                       argc = orig_args->argc;
-                       argv = orig_args->argv;
+                       argc = args->argc;
+                       argv = args->argv;
                        i--;
                        continue;
                }
index a0a82aa87f30354afa80ea1843bdaadc53bb6c5e..b2f15f7221494e387b47ba7eca16d6de5a00654c 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -213,7 +213,7 @@ void lockfile_release(const char *path);
 /* ------------------------------------------------------------------------- */
 /* ccache.c */
 
-bool cc_process_args(struct args *orig_args, struct args **preprocessor_args,
+bool cc_process_args(struct args *args, struct args **preprocessor_args,
                     struct args **compiler_args);
 void cc_reset(void);
 bool is_precompiled_header(const char *path);