Skip to contentSkip to conversation

Make logerror() and loginfo() static

PATCH In review Pavel Roskin 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make logerror() and loginfo() static

Make logerror() and loginfo() static

logerror() and loginfo() in daemon.c are never declared and never called from other files, therefore they should be declared static. Found by sparse.

daemon.c +2 -2
@@ -57,7 +57,7 @@ static void logreport(int priority, cons
 	write(2, buf, buflen);
 }
 
-void logerror(const char *err, ...)
+static void logerror(const char *err, ...)
 {
 	va_list params;
 	va_start(params, err);
@@ -65,7 +65,7 @@ void logerror(const char *err, ...)
 	va_end(params);
 }
 
-void loginfo(const char *err, ...)
+static void loginfo(const char *err, ...)
 {
 	va_list params;
 	if (!verbose)
Signature · 2 lines
Regards,
Pavel Roskin
#1 lore raw

Thanks. Will apply.

Next time around, please CC me (or To me and CC list), if the patch is trivial and for immediate application.