Simplify __log().
[osl.git] / osl.c
diff --git a/osl.c b/osl.c
index 90601dc287e3b8ec3de7baf7b9d1c6f2862e1c72..d12b6b25ed00958172ef6102eb9cee4bf1030a70 100644 (file)
--- a/osl.c
+++ b/osl.c
@@ -61,20 +61,18 @@ static void __attribute ((constructor)) init_loglevel(void)
 __printf_2_3 void __log(int ll, const char* fmt,...)
 {
        va_list argp;
-       FILE *outfd;
        struct tm *tm;
        time_t t1;
        char str[255] = "";
 
        if (ll < loglevel)
                return;
-       outfd = stderr;
        time(&t1);
        tm = localtime(&t1);
        strftime(str, sizeof(str), "%b %d %H:%M:%S", tm);
-       fprintf(outfd, "%s ", str);
+       fprintf(stderr, "%s ", str);
        va_start(argp, fmt);
-       vfprintf(outfd, fmt, argp);
+       vfprintf(stderr, fmt, argp);
        va_end(argp);
 }