]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
feature/control: wrap some problem macros in COCCI
authorNick Mathewson <nickm@torproject.org>
Wed, 9 Oct 2019 16:36:47 +0000 (12:36 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Oct 2019 13:32:13 +0000 (09:32 -0400)
src/feature/control/control_cmd.c
src/feature/control/control_events.c

index ad4a4ef0af1db21156816841e72fd2c84e7c3374..999095edb32013a95a4e851fc63e89770e46c0c5 100644 (file)
@@ -2245,6 +2245,7 @@ typedef struct control_cmd_def_t {
  */
 #define CMD_FL_WIPE (1u<<0)
 
+#ifndef COCCI
 /** Macro: declare a command with a one-line argument, a given set of flags,
  * and a syntax definition.
  **/
@@ -2277,6 +2278,7 @@ typedef struct control_cmd_def_t {
       0,                                        \
       &obsolete_syntax,                         \
   }
+#endif
 
 /**
  * An array defining all the recognized controller commands.
index 82ea9439990050f933160506eb6a2be9376155ce..cc6b5019b39d2b1a78cd94199b13ac7181b2a48c 100644 (file)
@@ -1660,6 +1660,7 @@ control_event_status(int type, int severity, const char *format, va_list args)
   return 0;
 }
 
+#ifndef COCCI
 #define CONTROL_EVENT_STATUS_BODY(event, sev)                   \
   int r;                                                        \
   do {                                                          \
@@ -1671,6 +1672,7 @@ control_event_status(int type, int severity, const char *format, va_list args)
     r = control_event_status((event), (sev), format, ap);       \
     va_end(ap);                                                 \
   } while (0)
+#endif
 
 /** Format and send an EVENT_STATUS_GENERAL event whose main text is obtained
  * by formatting the arguments using the printf-style <b>format</b>. */