From 57585aef2090c87a62cdf90a869501d1e00bfa58 Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Mon, 18 Apr 2011 22:06:35 -0400 Subject: [PATCH] switchmask return value was not changed correctly in manual patching Fixes #241 --- hdrs/command.h | 2 +- src/command.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hdrs/command.h b/hdrs/command.h index 3b4400b..feb388e 100644 --- a/hdrs/command.h +++ b/hdrs/command.h @@ -202,7 +202,7 @@ struct command_perms_t { #define SWITCH_NONE 0 #include "switches.h" -extern switch_mask *switchmask(const char *switches); +extern switch_mask switchmask(const char *switches); extern COMMAND_INFO *command_find(const char *name); extern COMMAND_INFO *command_find_exact(const char *name); extern COMMAND_INFO *command_add diff --git a/src/command.c b/src/command.c index bbbe48a..896b412 100644 --- a/src/command.c +++ b/src/command.c @@ -642,7 +642,7 @@ command_modify(const char *name, int type, const char *command_lock, switch_mask * \return pointer to a static switch mask. */ switch_mask -*switchmask(const char *switches) +switchmask(const char *switches) { static switch_mask sw = NULL; static int sm_bytes = 0; @@ -668,7 +668,7 @@ switch_mask else SW_SET(sw, switchnum); } - return &sw; + return sw; } /** Add an alias to the table of reserved aliases. -- 2.30.2