[Sheepdog] [PATCH 07/12] avoid mixed declarations and code

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri May 21 13:42:34 CEST 2010


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 lib/logger.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/logger.c b/lib/logger.c
index 65c1d42..542fe5a 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -244,12 +244,13 @@ static int log_dequeue(void *buff)
 	struct logmsg * src = (struct logmsg *)la->head;
 	struct logmsg * dst = (struct logmsg *)buff;
 	struct logmsg * lst = (struct logmsg *)la->tail;
+	int len;
 
 	if (la->empty)
 		return 1;
 
-	int len = strlen((char *)&src->str) * sizeof(char) +
-		  sizeof(struct logmsg) + 1;
+	len = strlen((char *)&src->str) * sizeof(char) +
+		sizeof(struct logmsg) + 1;
 
 	dst->prio = src->prio;
 	memcpy(dst, src,  len);
-- 
1.5.6.5




More information about the sheepdog mailing list