[Sheepdog] [PATCH 2/3] logger: cleanup dolog

Christoph Hellwig hch at infradead.org
Wed Apr 25 08:59:14 CEST 2012


Remove the write only ts variable, move ops into the minimal required scope
and break lines after 80 characters.

Signed-off-by: Christoph Hellwig <hch at lst.de>

Index: sheepdog/lib/logger.c
===================================================================
--- sheepdog.orig/lib/logger.c	2012-04-25 08:34:15.520023896 +0200
+++ sheepdog/lib/logger.c	2012-04-25 08:36:46.308027758 +0200
@@ -285,14 +285,11 @@ static notrace void log_syslog(void *buf
 		syslog(msg->prio, "%s", (char *)&msg->str);
 }
 
-static notrace void dolog(int prio, const char *func, int line, const char *fmt, va_list ap)
+static notrace void dolog(int prio, const char *func, int line,
+		const char *fmt, va_list ap)
 {
-	struct timespec ts;
-	struct sembuf ops;
-
 	if (la) {
-		ts.tv_sec = 0;
-		ts.tv_nsec = 10000;
+		struct sembuf ops;
 
 		ops.sem_num = 0;
 		ops.sem_flg = SEM_UNDO;



More information about the sheepdog mailing list