From 3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 May 2018 16:02:14 +0200 Subject: mir_forkThread - stronger typizatioin for thread function parameter --- plugins/Db_autobackups/src/backup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Db_autobackups') diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index df31953a22..cb43a50d68 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -243,7 +243,7 @@ int Backup(wchar_t *backup_filename) } SendDlgItemMessage(progress_dialog, IDC_PROGRESS, PBM_SETPOS, (WPARAM)(100), 0); UpdateWindow(progress_dialog); - db_set_dw(0, MODULE, "LastBackupTimestamp", (DWORD)time(nullptr)); + db_set_dw(0, MODULE, "LastBackupTimestamp", (DWORD)time(0)); if (options.use_cloudfile) { @@ -308,7 +308,7 @@ void BackupStart(wchar_t *backup_filename) } if (backup_filename != nullptr) tm = mir_wstrdup(backup_filename); - if (mir_forkthread(BackupThread, (void*)tm) == INVALID_HANDLE_VALUE) { + if (mir_forkthread(BackupThread, tm) == INVALID_HANDLE_VALUE) { InterlockedExchange(&m_state, 0); /* Backup done. */ mir_free(tm); } @@ -316,7 +316,7 @@ void BackupStart(wchar_t *backup_filename) VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) { - time_t t = time(nullptr); + time_t t = time(0); time_t diff = t - (time_t)db_get_dw(0, "AutoBackups", "LastBackupTimestamp", 0); if (diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? (60 * 60) : (60 * 60 * 24))))) BackupStart(nullptr); -- cgit v1.2.3