+/* All functions that call the COMMAND_CHECK_STATUS or the
+ COMMAND_CHECK_STATUS_LIST macros must have out: goto label. */
+
+#define COMMAND_CHECK_STATUS \
+do { \
+ SILC_LOG_DEBUG(("Start")); \
+ SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL)); \
+ if (status != SILC_STATUS_OK) { \
+ COMMAND_REPLY_ERROR; \
+ goto out; \
+ } \
+} while(0)
+
+#define COMMAND_CHECK_STATUS_LIST \
+do { \
+ SILC_LOG_DEBUG(("Start")); \
+ SILC_GET16_MSB(status, silc_argument_get_arg_type(cmd->args, 1, NULL)); \
+ if (status != SILC_STATUS_OK && \
+ status != SILC_STATUS_LIST_START && \
+ status != SILC_STATUS_LIST_ITEM && \
+ status != SILC_STATUS_LIST_END) { \
+ COMMAND_REPLY_ERROR; \
+ goto out; \
+ } \
+} while(0)
+