src/video/SDL_fillrect.c
changeset 7037 3fedf1f25b94
parent 6885 700f1b25f77f
child 7677 871d43c6968a
     1.1 --- a/src/video/SDL_fillrect.c	Fri Mar 29 21:29:57 2013 -0400
     1.2 +++ b/src/video/SDL_fillrect.c	Sun Mar 31 12:48:50 2013 -0400
     1.3 @@ -315,14 +315,12 @@
     1.4      Uint8 *pixels;
     1.5  
     1.6      if (!dst) {
     1.7 -        SDL_SetError("Passed NULL destination surface");
     1.8 -        return -1;
     1.9 +        return SDL_SetError("Passed NULL destination surface");
    1.10      }
    1.11  
    1.12      /* This function doesn't work on surfaces < 8 bpp */
    1.13      if (dst->format->BitsPerPixel < 8) {
    1.14 -        SDL_SetError("SDL_FillRect(): Unsupported surface format");
    1.15 -        return -1;
    1.16 +        return SDL_SetError("SDL_FillRect(): Unsupported surface format");
    1.17      }
    1.18  
    1.19      /* If 'rect' == NULL, then fill the whole surface */
    1.20 @@ -338,8 +336,7 @@
    1.21  
    1.22      /* Perform software fill */
    1.23      if (!dst->pixels) {
    1.24 -        SDL_SetError("SDL_FillRect(): You must lock the surface");
    1.25 -        return (-1);
    1.26 +        return SDL_SetError("SDL_FillRect(): You must lock the surface");
    1.27      }
    1.28  
    1.29      pixels = (Uint8 *) dst->pixels + rect->y * dst->pitch +
    1.30 @@ -423,8 +420,7 @@
    1.31      int status = 0;
    1.32  
    1.33      if (!rects) {
    1.34 -        SDL_SetError("SDL_FillRects() passed NULL rects");
    1.35 -        return -1;
    1.36 +        return SDL_SetError("SDL_FillRects() passed NULL rects");
    1.37      }
    1.38  
    1.39      for (i = 0; i < count; ++i) {