[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 01/18] qtest: Fix FMT_timeval vs time_t
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH v2 01/18] qtest: Fix FMT_timeval vs time_t |
Date: |
Mon, 2 Sep 2013 13:10:39 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Aug 29, 2013 at 02:09:29PM -0700, Richard Henderson wrote:
> Since FMT_timeval unconditionally uses %ld for both tv_sec and tv_usec,
> and already casts tv_usec to long, also cast tv_sec to long.
>
> Cc: Andreas Färber <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> qtest.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/qtest.c b/qtest.c
> index ef671fb..584c707 100644
> --- a/qtest.c
> +++ b/qtest.c
> @@ -177,7 +177,7 @@ static void qtest_send_prefix(CharDriverState *chr)
>
> qtest_get_time(&tv);
> fprintf(qtest_log_fp, "[S +" FMT_timeval "] ",
> - tv.tv_sec, (long) tv.tv_usec);
> + (long) tv.tv_sec, (long) tv.tv_usec);
> }
>
> static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr,
> @@ -225,7 +225,7 @@ static void qtest_process_command(CharDriverState *chr,
> gchar **words)
>
> qtest_get_time(&tv);
> fprintf(qtest_log_fp, "[R +" FMT_timeval "]",
> - tv.tv_sec, (long) tv.tv_usec);
> + (long) tv.tv_sec, (long) tv.tv_usec);
> for (i = 0; words[i]; i++) {
> fprintf(qtest_log_fp, " %s", words[i]);
> }
> @@ -485,7 +485,7 @@ static void qtest_event(void *opaque, int event)
> qtest_opened = true;
> if (qtest_log_fp) {
> fprintf(qtest_log_fp, "[I " FMT_timeval "] OPENED\n",
> - start_time.tv_sec, (long) start_time.tv_usec);
> + (long) start_time.tv_sec, (long) start_time.tv_usec);
> }
> break;
> case CHR_EVENT_CLOSED:
> @@ -494,7 +494,7 @@ static void qtest_event(void *opaque, int event)
> qemu_timeval tv;
> qtest_get_time(&tv);
> fprintf(qtest_log_fp, "[I +" FMT_timeval "] CLOSED\n",
> - tv.tv_sec, (long) tv.tv_usec);
> + (long) tv.tv_sec, (long) tv.tv_usec);
> }
> break;
> default:
Reviewed-by: Aurelien Jarno <address@hidden>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 01/18] qtest: Fix FMT_timeval vs time_t,
Aurelien Jarno <=