From 4d179f31a50918d5f704373a7668821b8c6a0599 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 5 Jul 2013 21:37:27 -0700 Subject: [PATCH] No, there's no reason not to use fprintf --- src/SDL_log.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/SDL_log.c b/src/SDL_log.c index 80c157966..c48f9ab8f 100644 --- a/src/SDL_log.c +++ b/src/SDL_log.c @@ -398,16 +398,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, } #elif defined(__PSP__) { - unsigned int length; - char* output; FILE* pFile; - /* !!! FIXME: is there any reason we didn't just use fprintf() here? */ - length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 2; - output = SDL_stack_alloc(char, length); - SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message); pFile = fopen ("SDL_Log.txt", "a"); - fwrite (output, strlen (output), 1, pFile); - SDL_stack_free(output); + fprintf(pFile, "%s: %s\n", SDL_priority_prefixes[priority], message); fclose (pFile); } #endif