summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-03 16:02:14 +0200
commit3ad2582c4a4a6378f294f9256ecbcbdf0ae88e3a (patch)
tree412a28ef6a572efc7039df1c363bf47a3dec4b19 /plugins/Db_autobackups/src
parent9a6f750a482d1d1ebf4281bb7bf8133e547ad438 (diff)
mir_forkThread<typename> - stronger typizatioin for thread function parameter
Diffstat (limited to 'plugins/Db_autobackups/src')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp6
1 files changed, 3 insertions, 3 deletions
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);