diff common-channel.c @ 1038:d3925ed45a85

Fix for old compilers, variable declarations at beginning of functions and /**/ comments
author Thorsten Horstmann <thorsten.horstmann@web.de>
date Tue, 24 Feb 2015 20:51:18 +0800
parents 0bb16232e7c4
children d0e6dd5af46e
line wrap: on
line diff
--- a/common-channel.c	Tue Feb 24 20:45:07 2015 +0800
+++ b/common-channel.c	Tue Feb 24 20:51:18 2015 +0800
@@ -402,7 +402,7 @@
 /* Send the close message and set the channel as closed */
 static void send_msg_channel_close(struct Channel *channel) {
 
-	TRACE(("enter send_msg_channel_close %p", channel))
+	TRACE(("enter send_msg_channel_close %p", (void*)channel))
 	if (channel->type->closehandler 
 			&& !channel->close_handler_done) {
 		channel->type->closehandler(channel);
@@ -616,7 +616,7 @@
 
 	channel = getchannel();
 
-	TRACE(("enter recv_msg_channel_request %p", channel))
+	TRACE(("enter recv_msg_channel_request %p", (void*)channel))
 
 	if (channel->sent_close) {
 		TRACE(("leave recv_msg_channel_request: already closed channel"))
@@ -1141,10 +1141,10 @@
 }
 
 struct Channel* get_any_ready_channel() {
+	size_t i;
 	if (ses.chancount == 0) {
 		return NULL;
 	}
-	size_t i;
 	for (i = 0; i < ses.chansize; i++) {
 		struct Channel *chan = ses.channels[i];
 		if (chan