tiny improvement

This commit is contained in:
rusefi 2017-06-03 21:59:58 -04:00
parent 1f9dcf4ab0
commit 2e70c3915e
1 changed files with 1 additions and 9 deletions

View File

@ -82,19 +82,11 @@ void append(Logging *logging, const char *text) {
* @note This method if fast because it does not validate much, be sure what you are doing
*/
void appendFast(Logging *logging, const char *text) {
// todo: fix this implementation? this would be a one-pass implementation instead of a two-pass
register char *s;
for (s = (char *) text; *s; ++s)
;
int extraLen = (s - text);
s = logging->linePointer;
while ((*s++ = *text++) != 0)
;
// strcpy(logging->linePointer, text);
logging->linePointer += extraLen;
logging->linePointer = s - 1;
}
// todo: look into chsnprintf once on Chibios 3