From 904beec507f7bfda93ddbb2ac2667f4a8cad53da Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 15 Jul 2005 16:13:26 +0000 Subject: [PATCH] ensure that format string macros are undef'd after use (bug #4716) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6139 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_groupcount.c | 1 + channels/chan_zap.c | 4 ++-- file.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c index ab31a3942a..57c00c8202 100755 --- a/apps/app_groupcount.c +++ b/apps/app_groupcount.c @@ -204,6 +204,7 @@ static int group_show_channels(int fd, int argc, char *argv[]) ast_cli(fd, "%d active channel%s\n", numchans, (numchans != 1) ? "s" : ""); return RESULT_SUCCESS; +#undef FORMAT_STRING } static char *tdesc = "Group Management Routines"; diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 84ab23a183..892048ad8a 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -9494,9 +9494,9 @@ static int zap_show_status(int fd, int argc, char *argv[]) { } close(ctl); - #undef FORMAT - #undef FORMAT2 return RESULT_SUCCESS; +#undef FORMAT +#undef FORMAT2 } static char show_channels_usage[] = diff --git a/file.c b/file.c index 9cb6d23937..07c88d158e 100755 --- a/file.c +++ b/file.c @@ -1223,6 +1223,9 @@ static int show_file_formats(int fd, int argc, char *argv[]) }; ast_mutex_unlock(&formatlock); return RESULT_SUCCESS; +#undef FORMAT +#undef FORMAT2 + } struct ast_cli_entry show_file =