aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PropSet.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/PropSet.cxx')
-rw-r--r--src/PropSet.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index b527c385c..60d53088f 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -98,13 +98,13 @@ void PropSet::Set(const char *key, const char *val, int lenKey, int lenVal) {
lenVal = static_cast<int>(strlen(val));
unsigned int hash = HashString(key, lenKey);
for (Property *p = props[hash % hashRoots]; p; p = p->next) {
- if ((hash == p->hash) &&
- ((strlen(p->key) == static_cast<unsigned int>(lenKey)) &&
+ if ((hash == p->hash) &&
+ ((strlen(p->key) == static_cast<unsigned int>(lenKey)) &&
(0 == strncmp(p->key, key, lenKey)))) {
// Replace current value
delete [](p->val);
p->val = StringDup(val, lenVal);
- return ;
+ return;
}
}
// Not found
@@ -257,7 +257,7 @@ SString PropSet::GetWild(const char *keybase, const char *filename) {
if (keyfile == NULL)
keyfile = orgkeyfile;
- for (; ; ) {
+ for (;;) {
char *del = strchr(keyfile, ';');
if (del == NULL)
del = keyfile + strlen(keyfile);
@@ -328,9 +328,9 @@ void PropSet::Clear() {
while (p) {
Property *pNext = p->next;
p->hash = 0;
- delete p->key;
+ delete []p->key;
p->key = 0;
- delete p->val;
+ delete []p->val;
p->val = 0;
delete p;
p = pNext;
@@ -669,13 +669,13 @@ char *WordList::GetNearestWords(
if (!cond) {
// Find first match
while ((pivot > start) &&
- (0 == CompareNCaseInsensitive(wordStart,
+ (0 == CompareNCaseInsensitive(wordStart,
wordsNoCase[pivot-1], searchLen))) {
--pivot;
}
// Grab each match
while ((pivot <= end) &&
- (0 == CompareNCaseInsensitive(wordStart,
+ (0 == CompareNCaseInsensitive(wordStart,
wordsNoCase[pivot], searchLen))) {
wordlen = LengthWord(wordsNoCase[pivot], otherSeparator) + 1;
wordsNear.append(wordsNoCase[pivot], wordlen, ' ');
@@ -695,14 +695,14 @@ char *WordList::GetNearestWords(
if (!cond) {
// Find first match
while ((pivot > start) &&
- (0 == strncmp(wordStart,
- words[pivot-1], searchLen))) {
+ (0 == strncmp(wordStart,
+ words[pivot-1], searchLen))) {
--pivot;
}
// Grab each match
while ((pivot <= end) &&
- (0 == strncmp(wordStart,
- words[pivot], searchLen))) {
+ (0 == strncmp(wordStart,
+ words[pivot], searchLen))) {
wordlen = LengthWord(words[pivot], otherSeparator) + 1;
wordsNear.append(words[pivot], wordlen, ' ');
++pivot;