]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: move the directive #endif to the end of file
authorGodbach <nylzhaowei@gmail.com>
Mon, 28 Jul 2014 09:31:57 +0000 (17:31 +0800)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Jul 2014 09:03:14 +0000 (11:03 +0200)
If a source file includes proto/server.h twice or more, redefinition errors will
be triggered for such inline functions as server_throttle_rate(),
server_is_draining(), srv_adm_set_maint() and so on. Just move #endif directive
to the end of file to solve this issue.

Signed-off-by: Godbach <nylzhaowei@gmail.com>
include/proto/server.h

index 9893266c0c2974ea5954f94d247d91fbda3a8112..71c8b1390b565e79e7721e56d4d30427be2e4cfb 100644 (file)
@@ -54,8 +54,6 @@ static void inline srv_set_sess_last(struct server *s)
        s->counters.last_sess = now.tv_sec;
 }
 
-#endif /* _PROTO_SERVER_H */
-
 /*
  * Registers the server keyword list <kwl> as a list of valid keywords for next
  * parsing sessions.
@@ -200,6 +198,8 @@ static inline void srv_adm_set_ready(struct server *s)
        srv_clr_admin_flag(s, SRV_ADMF_FMAINT);
 }
 
+#endif /* _PROTO_SERVER_H */
+
 /*
  * Local variables:
  *  c-indent-level: 8