src/video/cocoa/SDL_cocoawindow.m
changeset 7037 3fedf1f25b94
parent 6953 b83579d7d19a
child 7084 9d43403e9fc5
--- a/src/video/cocoa/SDL_cocoawindow.m	Fri Mar 29 21:29:57 2013 -0400
+++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 31 12:48:50 2013 -0400
@@ -501,8 +501,7 @@
     /* Allocate the window data */
     data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data));
     if (!data) {
-        SDL_OutOfMemory();
-        return -1;
+        return SDL_OutOfMemory();
     }
     data->window = window;
     data->nswindow = nswindow;
@@ -954,8 +953,7 @@
 
     if (CGSetDisplayTransferByTable(display_id, tableSize,
                                     redTable, greenTable, blueTable) != CGDisplayNoErr) {
-        SDL_SetError("CGSetDisplayTransferByTable()");
-        return -1;
+        return SDL_SetError("CGSetDisplayTransferByTable()");
     }
     return 0;
 }
@@ -973,8 +971,7 @@
 
     if (CGGetDisplayTransferByTable(display_id, tableSize,
                                     redTable, greenTable, blueTable, &tableCopied) != CGDisplayNoErr) {
-        SDL_SetError("CGGetDisplayTransferByTable()");
-        return -1;
+        return SDL_SetError("CGGetDisplayTransferByTable()");
     }
 
     for (i = 0; i < tableCopied; i++) {