summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
commit41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch)
tree36318f807498cf15b405eda5c451fd37bfe1b675 /plugins/Db3x_mmap
parent97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (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/Db3x_mmap')
-rw-r--r--plugins/Db3x_mmap/src/database.cpp10
-rw-r--r--plugins/Db3x_mmap/src/dbcontacts.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp
index 47b12b2c70..7a99d7fe3a 100644
--- a/plugins/Db3x_mmap/src/database.cpp
+++ b/plugins/Db3x_mmap/src/database.cpp
@@ -130,13 +130,13 @@ char* printVariant(DBVARIANT* p)
static char boo[1000];
switch (p->type) {
- case DBVT_BYTE: mir_snprintf(boo, sizeof(boo), "byte: %d", p->bVal ); break;
- case DBVT_WORD: mir_snprintf(boo, sizeof(boo), "word: %d", p->wVal ); break;
- case DBVT_DWORD: mir_snprintf(boo, sizeof(boo), "dword: %d", p->dVal ); break;
+ case DBVT_BYTE: mir_snprintf(boo, SIZEOF(boo), "byte: %d", p->bVal ); break;
+ case DBVT_WORD: mir_snprintf(boo, SIZEOF(boo), "word: %d", p->wVal ); break;
+ case DBVT_DWORD: mir_snprintf(boo, SIZEOF(boo), "dword: %d", p->dVal ); break;
case DBVT_UTF8:
- case DBVT_ASCIIZ: mir_snprintf(boo, sizeof(boo), "string: '%s'", p->pszVal); break;
+ case DBVT_ASCIIZ: mir_snprintf(boo, SIZEOF(boo), "string: '%s'", p->pszVal); break;
case DBVT_DELETED: strcpy(boo, "deleted"); break;
- default: mir_snprintf(boo, sizeof(boo), "crap: %d", p->type ); break;
+ default: mir_snprintf(boo, SIZEOF(boo), "crap: %d", p->type ); break;
}
return boo;
}
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp
index cecd5f85b0..9d65790c8c 100644
--- a/plugins/Db3x_mmap/src/dbcontacts.cpp
+++ b/plugins/Db3x_mmap/src/dbcontacts.cpp
@@ -414,7 +414,7 @@ void CDb3Mmap::FillContacts()
cc->pSubs = (MCONTACT*)mir_alloc(cc->nSubs*sizeof(MCONTACT));
for (int i = 0; i < cc->nSubs; i++) {
char setting[100];
- mir_snprintf(setting, sizeof(setting), "Handle%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "Handle%d", i);
cc->pSubs[i] = (0 != GetContactSetting(dwContactID, META_PROTO, setting, &dbv)) ? NULL : dbv.dVal;
}
}
@@ -452,7 +452,7 @@ void CDb3Mmap::FillContacts()
ccMeta->pSubs[dbv.dVal] = hh;
char setting[100];
- mir_snprintf(setting, sizeof(setting), "Handle%d", dbv.dVal);
+ mir_snprintf(setting, SIZEOF(setting), "Handle%d", dbv.dVal);
dbws.szSetting = setting;
dbws.value.dVal = hh;
WriteContactSetting(ccMeta->contactID, &dbws);