Commit 1a61394c2a0471d6a5338609161030fc4e9a5e0c
Exists in
master
and in
1 other branch
Merge branch 'develop' of https://github.com/PerryWerneck/libv3270 into develop
Showing
4 changed files
with
9 additions
and
5 deletions
Show diff stats
.github/workflows/codeql-analysis.yml
README.md
... | ... | @@ -20,8 +20,8 @@ For the supported distributions get the install repositories and instructions fr |
20 | 20 | |
21 | 21 | ### Requirements |
22 | 22 | |
23 | - * GTK-3 (https://www.gtk.org/) | |
24 | - * lib3270 (https://softwarepublico.gov.br/social/pw3270/) | |
23 | + * [GTK3](https://www.gtk.org/) | |
24 | + * [lib3270](../../../lib3270) | |
25 | 25 | |
26 | 26 | ### Building |
27 | 27 | ... | ... |
src/filetransfer/v3270ftprogress.c
... | ... | @@ -485,7 +485,9 @@ void v3270ftprogress_update(GtkWidget *widget, unsigned long current, unsigned l |
485 | 485 | char buffer[40]; |
486 | 486 | double seconds = ((double) remaining) / kbytes_sec; |
487 | 487 | time_t eta = time(0) + ((time_t) seconds); |
488 | - strftime(buffer, 39, "%H:%M:%S", localtime(&eta)); | |
488 | + struct tm tm; | |
489 | + | |
490 | + strftime(buffer, 39, "%H:%M:%S", localtime_r(&eta,&tm)); | |
489 | 491 | |
490 | 492 | gtk_entry_set_text(dialog->info[PROGRESS_FIELD_ETA],buffer); |
491 | 493 | ... | ... |
src/filetransfer/worker.c
... | ... | @@ -455,7 +455,8 @@ |
455 | 455 | char buffer[40]; |
456 | 456 | double seconds = ((double) remaining) / update->kbytes_sec; |
457 | 457 | time_t eta = time(NULL) + ((time_t) seconds); |
458 | - strftime(buffer, 39, "%H:%M:%S", localtime(&eta)); | |
458 | + struct tm tm; | |
459 | + strftime(buffer, 39, "%H:%M:%S", localtime_r(&eta,&tm)); | |
459 | 460 | |
460 | 461 | gtk_entry_set_text(update->worker->field[PROGRESS_FIELD_ETA],buffer); |
461 | 462 | ... | ... |