MEDIUM: check: remove checkport checkaddr flag

While trying to fix some consistency problem with the config file/cli
(e.g. check-port cli command does not set the flag), we realised
checkport flag was not necessarily needed. Indeed tcpcheck uses service
port as the last choice if check.port is zero. So we can assume if
check.port is zero, it means it was never set by the user, regardless if
it is by the cli or config file.  In the longterm this will avoid to
introduce a new consistency issue if we forget to set the flag.

in the same manner of checkport flag, we don't really need checkaddr
flag. We can assume if checkaddr is not set, it means it was never set
by the user or config.

Signed-off-by: William Dauchy <wdauchy@gmail.com>
diff --git a/include/haproxy/server-t.h b/include/haproxy/server-t.h
index b29c75c..96816e1 100644
--- a/include/haproxy/server-t.h
+++ b/include/haproxy/server-t.h
@@ -137,8 +137,6 @@
 #define SRV_F_NON_STICK    0x0004        /* never add connections allocated to this server to a stick table */
 #define SRV_F_USE_NS_FROM_PP 0x0008      /* use namespace associated with connection if present */
 #define SRV_F_FORCED_ID    0x0010        /* server's ID was forced in the configuration */
-#define SRV_F_CHECKADDR    0x0020        /* this server has a check addr configured */
-#define SRV_F_CHECKPORT    0x0040        /* this server has a check port configured */
 #define SRV_F_AGENTADDR    0x0080        /* this server has a agent addr configured */
 #define SRV_F_COOKIESET    0x0100        /* this server has a cookie configured, so don't generate dynamic cookies */
 #define SRV_F_FASTOPEN     0x0200        /* Use TCP Fast Open to connect to server */
diff --git a/src/check.c b/src/check.c
index 879fe84..e24050f 100644
--- a/src/check.c
+++ b/src/check.c
@@ -1527,7 +1527,6 @@
 	}
 
 	srv->check.addr = srv->agent.addr = *sk;
-	srv->flags |= SRV_F_CHECKADDR;
 	srv->flags |= SRV_F_AGENTADDR;
 
   out:
@@ -2050,7 +2049,6 @@
 
 	global.maxsock++;
 	srv->check.port = atol(args[*cur_arg+1]);
-	srv->flags |= SRV_F_CHECKPORT;
 
   out:
 	return err_code;
diff --git a/src/server.c b/src/server.c
index 04e00d5..76bd49f 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1660,8 +1660,6 @@
 	srv->flags                   |= src->flags;
 	srv->do_check                 = src->do_check;
 	srv->do_agent                 = src->do_agent;
-	if (srv->check.port)
-		srv->flags |= SRV_F_CHECKPORT;
 	srv->check.inter              = src->check.inter;
 	srv->check.fastinter          = src->check.fastinter;
 	srv->check.downinter          = src->check.downinter;
@@ -3657,7 +3655,7 @@
 				 * we're switching from a fixed port to a SRV_F_MAPPORTS (mapped) port
 				 * prevent PORT change if check doesn't have it's dedicated port while switching
 				 * to port mapping */
-				if ((s->check.state & CHK_ST_CONFIGURED) && !(s->flags & SRV_F_CHECKPORT)) {
+				if (!s->check.port) {
 					chunk_appendf(msg, "can't change <port> to port map because it is incompatible with current health check port configuration (use 'port' statement from the 'server' directive.");
 					goto out;
 				}