No, there's no reason not to use fprintf
authorSam Lantinga <slouken@libsdl.org>
Fri, 05 Jul 2013 21:37:27 -0700
changeset 7350 302af2a46a66
parent 7349 a96c85910792
child 7351 668a3dc28361
No, there's no reason not to use fprintf
src/SDL_log.c
--- a/src/SDL_log.c	Fri Jul 05 21:25:32 2013 -0700
+++ b/src/SDL_log.c	Fri Jul 05 21:37:27 2013 -0700
@@ -398,16 +398,9 @@
     }
 #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