diff options
| author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-11-28 21:19:14 +0000 | 
|---|---|---|
| committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-11-28 21:19:14 +0000 | 
| commit | 6895d635acb37ba42e53ba95ca3eee2ddbbef24d (patch) | |
| tree | f85a1d97784c4597099864119acb027b9a3f2dba /plugins/DbEditorPP/src | |
| parent | 8ef06acf351fdb6034b6e13670d84bfd79161956 (diff) | |
Massive code cleanup and fixes for a lot of warnings reported in #837
git-svn-id: http://svn.miranda-ng.org/main/trunk@11136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src')
| -rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 9 | ||||
| -rw-r--r-- | plugins/DbEditorPP/src/settinglist.cpp | 4 | 
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 7bd1643e0c..2d452fac31 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -241,7 +241,8 @@ void exportDB(MCONTACT hContact, char *module)  			}
  			else
  			{
 -				if (module == "") module = NULL; // reset module for all contacts export
 +				if (*module = '\0')
 +					module = NULL; // reset module for all contacts export
  			}
  			hContact = db_find_first();
 @@ -422,7 +423,7 @@ void importSettings(MCONTACT hContact, char *importstring )  		else if (importstring[i] == '[' && !strchr(&importstring[i+1],'='))// get the module
  		{
  			if (end = strpbrk(&importstring[i+1], "]")) {
 -				if ((end+1) != '\0') *end = '\0';
 +				if (*(end+1) != '\0') *end = '\0';
  				strcpy(module, &importstring[i+1]);
  			}
  		}
 @@ -430,7 +431,7 @@ void importSettings(MCONTACT hContact, char *importstring )  			!strchr(&importstring[i+2],'='))// get the module
  		{
  			if (end = strpbrk(&importstring[i+2], "]")) {
 -				if ((end+1) != '\0') *end = '\0';
 +				if (*(end+1) != '\0') *end = '\0';
  				strcpy(module, &importstring[i+2]);
  				deleteModule(module, hContact, 1);
  			}
 @@ -438,7 +439,7 @@ void importSettings(MCONTACT hContact, char *importstring )  		else if (strstr(&importstring[i], "=") && module[0]) // get the setting
  		{
  			if (end = strpbrk(&importstring[i+1], "=")) {
 -				if ((end+1) != '\0') *end = '\0';
 +				if (*(end+1) != '\0') *end = '\0';
  				strcpy(setting, &importstring[i]);
  				// get the type
 diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index 1cb5f3975f..c9d655c698 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -659,8 +659,8 @@ INT_PTR CALLBACK SettingsCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam)  	const int maxSize = 1024;
  	TCHAR text1[maxSize];
  	TCHAR text2[maxSize];
 -	ListView_GetItemText(params.hList, (int)lParam1, params.column, text1, maxSize);
 -	ListView_GetItemText(params.hList, (int)lParam2, params.column, text2, maxSize);
 +	ListView_GetItemText(params.hList, lParam1, params.column, text1, maxSize);
 +	ListView_GetItemText(params.hList, lParam2, params.column, text2, maxSize);
  	int res = _tcsicmp(text1, text2);
  	res = (params.column == lastColumn) ? -res : res;
  | 
