From 963c4fe2e94208a251b269e3a6918a71e8de1939 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 17 Jul 2019 10:12:59 +0200 Subject: simplify --- src/cadet/cadet_api.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c index 0e655ee33..ff6f15543 100644 --- a/src/cadet/cadet_api.c +++ b/src/cadet/cadet_api.c @@ -11,7 +11,7 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . @@ -932,21 +932,17 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel) */ const union GNUNET_CADET_ChannelInfo * GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, - enum GNUNET_CADET_ChannelInfoOption option, + enum GNUNET_CADET_ChannelInfoOption option, ...) { - static int bool_flag; - switch (option) { - case GNUNET_CADET_OPTION_PEER: - return (const union GNUNET_CADET_ChannelInfo *) &channel->peer; - break; - default: - GNUNET_break (0); - return NULL; + case GNUNET_CADET_OPTION_PEER: + return (const union GNUNET_CADET_ChannelInfo *) &channel->peer; + default: + GNUNET_break (0); + return NULL; } - return (const union GNUNET_CADET_ChannelInfo *) &channel->peer; } -- cgit v1.2.3