From: Rick L Bird Date: Tue, 19 Apr 2011 02:06:35 +0000 (-0400) Subject: switchmask return value was not changed correctly in manual patching X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=57585aef2090c87a62cdf90a869501d1e00bfa58;p=cobramush.git switchmask return value was not changed correctly in manual patching Fixes #241 --- 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.