[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Rename CMD_OTHER to CMD_IMMEDIATE



commit b9f002dec6fac7276a34371e6183db0f4cd8560a
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Oct 16 16:39:58 2019 -0400

    Rename CMD_OTHER to CMD_IMMEDIATE
---
 src/app/config/config.c           | 18 +++++++++---------
 src/app/config/tor_cmdline_mode.h |  4 ++--
 src/app/main/main.c               |  2 +-
 src/app/main/ntmain.c             |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/app/config/config.c b/src/app/config/config.c
index cc5bc8827..522c3b572 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2494,25 +2494,25 @@ static const struct {
   { .name="--hush",
     .quiet=1 },
   { .name="--version",
-    .command=CMD_OTHER,
+    .command=CMD_IMMEDIATE,
     .quiet=1 },
   { .name="--list-modules",
-    .command=CMD_OTHER,
+    .command=CMD_IMMEDIATE,
     .quiet=1 },
   { .name="--library-versions",
-    .command=CMD_OTHER,
+    .command=CMD_IMMEDIATE,
     .quiet=1 },
   { .name="-h",
-    .command=CMD_OTHER,
+    .command=CMD_IMMEDIATE,
     .quiet=1 },
   { .name="--help",
-    .command=CMD_OTHER,
+    .command=CMD_IMMEDIATE,
     .quiet=1  },
   { .name="--list-torrc-options",
-    .command=CMD_OTHER,
+    .command=CMD_IMMEDIATE,
     .quiet=1 },
   { .name="--list-deprecated-options",
-    .command=CMD_OTHER },
+    .command=CMD_IMMEDIATE },
   { .name="--nt-service" },
   { .name="-nt-service" },
   { .name=NULL },
@@ -5321,8 +5321,8 @@ options_init_from_torrc(int argc, char **argv)
 
   int command = global_cmdline->command;
   const char *command_arg = global_cmdline->command_arg;
-  /* "Other" has already been handled by this point. */
-  tor_assert(command != CMD_OTHER);
+  /* "immediate" has already been handled by this point. */
+  tor_assert(command != CMD_IMMEDIATE);
 
   if (command == CMD_HASH_PASSWORD) {
     cf_defaults = tor_strdup("");
diff --git a/src/app/config/tor_cmdline_mode.h b/src/app/config/tor_cmdline_mode.h
index 36626bed5..b2c43bbb8 100644
--- a/src/app/config/tor_cmdline_mode.h
+++ b/src/app/config/tor_cmdline_mode.h
@@ -24,8 +24,8 @@ typedef enum {
   CMD_DUMP_CONFIG, /**< Running --dump-config. */
   CMD_KEYGEN, /**< Running --keygen */
   CMD_KEY_EXPIRATION, /**< Running --key-expiration */
-  CMD_OTHER, /**< Special value: indicates a command that is handled
-              * immediately during configuration processing. */
+  CMD_IMMEDIATE, /**< Special value: indicates a command that is handled
+                  * immediately during configuration processing. */
   CMD_RUN_UNITTESTS, /**< Special value: indicates that we have entered
                       * the Tor code from the unit tests, not from the
                       * regular Tor binary at all. */
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 95dccbee6..22694fdbb 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -1339,7 +1339,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
     result = do_dump_config();
     break;
   case CMD_RUN_UNITTESTS: /* only set by test.c */
-  case CMD_OTHER: /* Handled in config.c */
+  case CMD_IMMEDIATE: /* Handled in config.c */
   default:
     log_warn(LD_BUG,"Illegal command number %d: internal error.",
              get_options()->command);
diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c
index 16dc72acc..9351d9687 100644
--- a/src/app/main/ntmain.c
+++ b/src/app/main/ntmain.c
@@ -340,7 +340,7 @@ nt_service_main(void)
                "or --key-expiration) in NT service.");
         break;
       case CMD_RUN_UNITTESTS:
-      case CMD_OTHER:
+      case CMD_IMMEDIATE:
       default:
         log_err(LD_CONFIG, "Illegal command number %d: internal error.",
                 get_options()->command);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits