cosmetic: logging: if color is disabled, don't print ""

If color output is disabled, skip the empty snprintf() to (not) clear the ANSI
color.

Also, no need to use a format string of "%s", just pass the string constant
directly.

That is a micro optimisation as well as clarification of the code.

Change-Id: Ie7cb06de160830d2f8ee5718246c0fe311f68d49
diff --git a/src/logging.c b/src/logging.c
index 9b37bf5..e6e09e0 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -398,11 +398,12 @@
 		goto err;
 	OSMO_SNPRINTF_RET(ret, rem, offset, len);
 
-	ret = snprintf(buf + offset, rem, "%s",
-			target->use_color ? "\033[0;m" : "");
-	if (ret < 0)
-		goto err;
-	OSMO_SNPRINTF_RET(ret, rem, offset, len);
+	if (target->use_color) {
+		ret = snprintf(buf + offset, rem, "\033[0;m");
+		if (ret < 0)
+			goto err;
+		OSMO_SNPRINTF_RET(ret, rem, offset, len);
+	}
 err:
 	buf[sizeof(buf)-1] = '\0';
 	target->output(target, level, buf);