From 80dee159defe5e7770b14fc03b9901c5c149885e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesin=CC=81ski?= Date: Sat, 26 Jul 2014 00:53:33 +0100 Subject: [PATCH] Simpler newline --- Sparkle/SULog.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sparkle/SULog.m b/Sparkle/SULog.m index a64b5894..267e6789 100644 --- a/Sparkle/SULog.m +++ b/Sparkle/SULog.m @@ -64,13 +64,10 @@ void SULog(NSString *format, ...) FILE *logfile = fopen([[LOG_FILE_PATH stringByExpandingTildeInPath] fileSystemRepresentation], "a"); if (logfile) { - theStr = [NSString stringWithFormat:@"%@: %@", [NSDate date], theStr]; + theStr = [NSString stringWithFormat:@"%@: %@\n", [NSDate date], theStr]; NSData *theData = [theStr dataUsingEncoding:NSUTF8StringEncoding]; - char newlineChar = '\n'; fwrite([theData bytes], 1, [theData length], logfile); - fwrite(&newlineChar, 1, 1, logfile); // Append a newline. fclose(logfile); - logfile = NULL; } va_end(ap); }