diff options
Diffstat (limited to 'plugins/UserInfoEx/src/classMTime.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/classMTime.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index 5035d8eac9..190488b10a 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -423,20 +423,14 @@ void MTime::GetLocalTime(HCONTACT hContact) * read and write time to miranda's database
*********************************************/
-int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- DWORD dwTimeStamp;
-
- if (hContact == INVALID_HANDLE_VALUE ||
- pszModule == NULL || pszModule[0] == 0 ||
- pszSetting == NULL || pszSetting[0] == 0)
- {
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) {
ZeroDate();
return 1;
}
- dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
-
+ DWORD dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
if (dwTimeStamp == 0) {
ZeroDate();
return 1;
@@ -448,11 +442,8 @@ int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) int MTime::DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == INVALID_HANDLE_VALUE ||
- pszModule == NULL || pszModule[0] == 0 ||
- pszSetting == NULL || pszSetting[0] == 0)
- {
+ if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0)
return 1;
- }
+
return db_set_dw(hContact, pszModule, pszSetting, TimeStamp());
}
|