Prevent compiler warnings and potential OLC setting string truncation.

- Prevented compiler warnings when using
’-Wtautological-pointer-compare’ on development system (Darwin)
- Prevented possible string truncation when adding a newline to an OLC
setting string.
This commit is contained in:
WyldTBA
2015-04-23 08:49:48 -04:00
parent 5dc6eae4c5
commit 68fcdb73bf
9 changed files with 18 additions and 19 deletions

View File

@@ -86,7 +86,7 @@ char *str_udupnl(const char *txt)
ptr = (txt && *txt) ? txt : undef;
CREATE(str, char, strlen(ptr) + 3);
strlcpy(str, ptr, strlen(ptr));
strlcpy(str, ptr, strlen(str));
strcat(str, "\r\n");
return str;