From 8536a1d8de423ab7d021c1f1364bb12fab8ce575 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 6 Jul 2013 20:00:57 +0200 Subject: [PATCH] net: Remove unused flowopt_add_bool(). --- net.c | 8 -------- net.h | 4 ---- 2 files changed, 12 deletions(-) diff --git a/net.c b/net.c index 4d52e4a4..c18e7a0a 100644 --- a/net.c +++ b/net.c @@ -305,14 +305,6 @@ void flowopt_add(struct flowopts *fo, int lev, int opt, list_add_tail(&new->node, &fo->sockopts); } -void flowopt_add_bool(struct flowopts *fo, int lev, int opt, - const char *optname, bool on_or_off) -{ - int on = on_or_off; /* kernel takes 'int' */ - - flowopt_add(fo, lev, opt, optname, &on, sizeof(on)); -} - /** Set the entire bunch of pre-connection options at once. */ static void flowopt_setopts(int sockfd, struct flowopts *fo) { diff --git a/net.h b/net.h index a2c0d173..ae5e8015 100644 --- a/net.h +++ b/net.h @@ -61,12 +61,8 @@ struct flowopts; extern struct flowopts *flowopt_new(void); extern void flowopt_add(struct flowopts *fo, int level, int opt, const char *name, const void *val, int len); -extern void flowopt_add_bool(struct flowopts *fo, int lev, int opt, - const char *optname, bool on_or_off); /** Flowopt shortcut macros */ #define OPT_ADD(fo, lev, opt, val, len) flowopt_add(fo, lev, opt, #opt, val, len) -#define OPT_ENABLE(fo, lev, opt) flowopt_add_bool(fo, lev, opt, #opt, 1) -#define OPT_DISABLE(fo, lev, opt) flowopt_add_bool(fo, lev, opt, #opt, 0) /** * Functions to parse and validate (parts of) URLs. -- 2.39.5