Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8254270: linux 32 bit build doesn't compile libjdwp/log_messages.c
Backport-of: 0b7fba7
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Dec 8, 2021
1 parent 9c63beb commit 2a8557a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -78,9 +78,12 @@ get_time_stamp(char *tbuf, size_t ltbuf)
"%d.%m.%Y %T", localtime(&t));
(void)strftime(timestamp_timezone, TZ_SIZE,
"%Z", localtime(&t));
(void)snprintf(tbuf, ltbuf,
"%s.%.3d %s", timestamp_date_time,
(int)(millisecs), timestamp_timezone);

// Truncate milliseconds in buffer large enough to hold the
// value which is always < 1000 (and so a maximum of 3 digits for "%.3d")
char tmp[20];
snprintf(tmp, sizeof(tmp), "%.3d", millisecs);
snprintf(tbuf, ltbuf, "%s.%.3s %s", timestamp_date_time, tmp, timestamp_timezone);
}

/* Get basename of filename */
Expand Down

1 comment on commit 2a8557a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.