shithub: choc

Download patch

ref: a22e4a163bb2cbf0939b4b73f4f889012c0fb414
parent: 002822dfa2bd78f946b7e4730004220919d4ddb9
author: Fabian Greffrath <fabian@greffrath.com>
date: Mon Mar 17 13:22:37 EDT 2014

Add some strictly unnecessary curly braces.

--- a/src/v_video.c
+++ b/src/v_video.c
@@ -738,12 +738,16 @@
 
     handle = fopen(filename, "wb");
     if (!handle)
+    {
         return;
+    }
 
     ppng = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
                                    error_fn, warning_fn);
     if (!ppng)
+    {
         return;
+    }
 
     pinfo = png_create_info_struct(ppng);
     if (!pinfo)
@@ -778,7 +782,9 @@
     png_write_info(ppng, pinfo);
 
     for (i = 0; i < SCREENHEIGHT; i++)
+    {
         png_write_row(ppng, data + i*SCREENWIDTH);
+    }
 
     png_write_end(ppng, pinfo);
     png_destroy_write_struct(&ppng, &pinfo);
@@ -801,10 +807,14 @@
 
 #ifdef HAVE_LIBPNG
     if (png_screenshots)
+    {
         ext = "png";
+    }
     else
 #endif
+    {
         ext = "pcx";
+    }
 
     for (i=0; i<=99; i++)
     {
@@ -823,15 +833,19 @@
 
 #ifdef HAVE_LIBPNG
     if (png_screenshots)
+    {
     WritePNGfile(lbmname, I_VideoBuffer,
                  SCREENWIDTH, SCREENHEIGHT,
                  W_CacheLumpName (DEH_String("PLAYPAL"), PU_CACHE));
+    }
     else
 #endif
+    {
     // save the pcx file
     WritePCXfile(lbmname, I_VideoBuffer,
                  SCREENWIDTH, SCREENHEIGHT,
                  W_CacheLumpName (DEH_String("PLAYPAL"), PU_CACHE));
+    }
 }
 
 #define MOUSE_SPEED_BOX_WIDTH  120