From 82cfd49e4dbb674669e8c91044ba317d1c075396 Mon Sep 17 00:00:00 2001 From: Michael Steinert Date: Mon, 11 Jun 2012 16:35:35 -0600 Subject: Add checks for derived socket type 1. Use a single instance of the vtable for each object. This saves some memory at the expense of an extra pointer dereference per method invocation. 2. Compare the class vtable pointer in sub-class methods to determine if the object type is correct. Signed-off-by: Michael Steinert --- tools/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/common.c b/tools/common.c index 9738ba6..ef8f37b 100644 --- a/tools/common.c +++ b/tools/common.c @@ -320,7 +320,7 @@ static void init_connection_info(struct amqp_connection_info *ci) amqp_connection_state_t make_connection(void) { int status; - amqp_socket_t *socket; + amqp_socket_t *socket = NULL; struct amqp_connection_info ci; amqp_connection_state_t conn; -- cgit v1.2.1