]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] peers: shut a printf format warning (key_size is a size_t)
authorWilly Tarreau <w@1wt.eu>
Thu, 11 Nov 2010 09:55:09 +0000 (10:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Nov 2010 10:05:04 +0000 (11:05 +0100)
Also fix a few misleading comments.

src/peers.c

index 76184079b8f7f51cae5d1b5a0e812aa80869edfd..19b8824121579dff10c249bd63ef6c2903a5cbc7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Stick table syncro management.
+ * Stick table synchro management.
  *
  * Copyright 2010 EXCELIANCE, Emeric Brun <ebrun@exceliance.fr>
  *
@@ -505,7 +505,7 @@ switchstate:
                                                getpid(),
                                                ps->table->table->id,
                                                ps->table->table->type,
-                                               ps->table->table->key_size);
+                                               (int)ps->table->table->key_size);
 
                                if (repl >= sizeof(trash)) {
                                        si->st0 = PEER_SESSION_END;
@@ -1066,7 +1066,8 @@ void peer_session_forceshutdown(struct session * session)
 /*
  * this function is called on a read event from a listen socket, corresponding
  * to an accept. It tries to accept as many connections as possible.
- * It returns 0.
+ * It returns a positive value upon success, 0 if the connection needs to be
+ * closed and ignored, or a negative value upon critical failure.
  */
 int peer_accept(struct session *s)
 {
@@ -1095,7 +1096,7 @@ int peer_accept(struct session *s)
 }
 
 /*
- * Create a new peer session in assingned state (connect will start automatically)
+ * Create a new peer session in assigned state (connect will start automatically)
  */
 struct session *peer_session_create(struct peer *peer, struct peer_session *ps)
 {