Skip to content
Permalink
Browse files
8254270: linux 32 bit build doesn't compile libjdwp/log_messages.c
Backport-of: 0b7fba75c139bc263cc77c1d29f31703dd88b6f4
  • Loading branch information
Dmitry Cherepanov committed Nov 22, 2021
1 parent f76b4e8 commit b67a357b198d888b8a835a9cb0c59987f49ebe10
Showing 1 changed file with 7 additions and 4 deletions.
@@ -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
@@ -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 */

1 comment on commit b67a357

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on b67a357 Nov 22, 2021

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.