]> granicus.if.org Git - pgbouncer/commitdiff
use goto instead break because of 2 loops
authorMarko Kreen <markokr@gmail.com>
Sat, 4 Aug 2007 21:29:24 +0000 (21:29 +0000)
committerMarko Kreen <markokr@gmail.com>
Sat, 4 Aug 2007 21:29:24 +0000 (21:29 +0000)
src/objects.c

index 8f307510c940f17e1ff61d8808dbbd0624097eb6..d9ccad8dcfe300283e86dbf0f500d670c905e592 100644 (file)
@@ -867,10 +867,11 @@ void accept_cancel_request(PgSocket *req)
                        client = container_of(citem, PgSocket, head);
                        if (memcmp(client->cancel_key, req->cancel_key, 8) == 0) {
                                main_client = client;
-                               break;
+                               goto found;
                        }
                }
        }
+found:
 
        /* wrong key */
        if (!main_client) {