Navigation Menu

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

Commit

Permalink
8254270: linux 32 bit build doesn't compile libjdwp/log_messages.c
Browse files Browse the repository at this point in the history
Backport-of: 0b7fba75c139bc263cc77c1d29f31703dd88b6f4
  • Loading branch information
Dmitry Cherepanov committed Nov 22, 2021
1 parent f76b4e8 commit b67a357
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 b67a357

@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.