portability dont assume size of tv.t_usec 24/2924/1
authorAndy Green <andy.green@linaro.org>
Thu, 17 Jan 2013 07:02:02 +0000 (15:02 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:26 +0000 (13:01 -0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/libwebsockets.c

index 68c14e6..c456d21 100644 (file)
@@ -2508,8 +2508,8 @@ void _lws_log(int filter, const char *format, ...)
 
        for (n = 0; n < LLL_COUNT; n++)
                if (filter == (1 << n)) {
-                       pos = sprintf(buf, "[%ld:%04ld] %s: ", tv.tv_sec,
-                                       tv.tv_usec / 100, log_level_names[n]);
+                       pos = sprintf(buf, "[%ld:%04d] %s: ", tv.tv_sec,
+                                       (int)(tv.tv_usec / 100), log_level_names[n]);
                        break;
                }