diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 04:50:22 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 04:50:22 +0000 |
commit | 41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch) | |
tree | 36318f807498cf15b405eda5c451fd37bfe1b675 /plugins/StatusPlugins/StartupStatus/profiles.cpp | |
parent | 97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (diff) |
mir_snprintf(..., sizeof() -> SIZEOF(), ...)
small fixs cleanups
git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus/profiles.cpp')
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/profiles.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 33ffb03994..c8a909bacf 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -107,7 +107,7 @@ static int CreateMainMenuItems(WPARAM wParam, LPARAM lParam) mi.ptszName = profilename; mi.position = 2000100000 + mcount; - mir_snprintf(servicename, sizeof(servicename), "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount); + mir_snprintf(servicename, SIZEOF(servicename), "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount); switch(mcount) { case 0: hProfileServices[mcount] = CreateServiceFunction(servicename, profileService0); @@ -161,7 +161,7 @@ INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam) DBVARIANT dbv; char setting[80]; - mir_snprintf(setting, sizeof(setting), "%d_%s", profile, SETTING_PROFILENAME); + mir_snprintf(setting, SIZEOF(setting), "%d_%s", profile, SETTING_PROFILENAME); if ( db_get_ts(NULL, MODULENAME, setting, &dbv)) return -1; @@ -190,7 +190,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) for ( int i=0; i < pceCount; i++ ) { if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) { - mir_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); + mir_snprintf(dbSetting, SIZEOF(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db pce[i].msg = ( TCHAR* )realloc(pce[i].msg, sizeof(TCHAR)*(_tcslen(dbv.ptszVal)+1)); if (pce[i].msg != NULL) { @@ -214,7 +214,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) pce[pceCount].profile = profile; pce[pceCount].szProto = _strdup(szProto); pce[pceCount].msg = NULL; - mir_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); + mir_snprintf(dbSetting, SIZEOF(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { pce[pceCount].msg = _tcsdup(dbv.ptszVal); db_free(&dbv); @@ -264,7 +264,7 @@ INT_PTR LoadAndSetProfile(WPARAM wParam, LPARAM lParam) profile = (profile >= 0)?profile:db_get_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0); char setting[64]; - mir_snprintf(setting, sizeof(setting), "%d_%s", profile, SETTING_SHOWCONFIRMDIALOG); + mir_snprintf(setting, SIZEOF(setting), "%d_%s", profile, SETTING_SHOWCONFIRMDIALOG); if (!db_get_b(NULL, MODULENAME, setting, 0)) CallService(MS_CS_SETSTATUSEX,(WPARAM)&profileSettings, 0); else @@ -339,7 +339,7 @@ static int RegisterHotKeys() return -1; char atomname[255]; - mir_snprintf(atomname, sizeof(atomname), "StatusProfile_%d", i); + mir_snprintf(atomname, SIZEOF(atomname), "StatusProfile_%d", i); hkInfo[hkiCount].id = GlobalAddAtomA(atomname); if (hkInfo[hkiCount].id == 0) continue; |