summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-04-11 12:49:39 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2013-04-11 12:49:39 (GMT)
commitf745646300856f3c0a3ce31b6976874e3251928a (patch)
tree233a42d6fb571edd4ceca34f388e72fdd1638ba5
parentd4e35f20bc80504475be71e0805189ab861336e0 (diff)
downloadlibnsgif-f745646300856f3c0a3ce31b6976874e3251928a.tar.gz
libnsgif-f745646300856f3c0a3ce31b6976874e3251928a.tar.bz2
Put semicolon for bodyless while loop on new line. Remove confusing indentation.
-rw-r--r--src/libnsgif.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/libnsgif.c b/src/libnsgif.c
index 98e650e..9c5b84f 100644
--- a/src/libnsgif.c
+++ b/src/libnsgif.c
@@ -934,22 +934,24 @@ gif_result gif_decode_frame(gif_animation *gif, unsigned int frame) {
* image, find the last image set to "do not dispose" and get that frame data
*/
} else if ((frame != 0) && (gif->frames[frame - 1].disposal_method == GIF_FRAME_RESTORE)) {
- while ((last_undisposed_frame != -1) && (gif->frames[--last_undisposed_frame].disposal_method == GIF_FRAME_RESTORE));
- /* If we don't find one, clear the frame data
+ while ((last_undisposed_frame != -1) && (gif->frames[--last_undisposed_frame].disposal_method == GIF_FRAME_RESTORE))
+ ;
+
+ /* If we don't find one, clear the frame data
+ */
+ if (last_undisposed_frame == -1) {
+ /* see notes above on transparency vs. background color */
+ memset((char*)frame_data, GIF_TRANSPARENT_COLOUR, gif->width * gif->height * sizeof(int));
+ } else {
+ if ((return_value = gif_decode_frame(gif, last_undisposed_frame)) != GIF_OK)
+ goto gif_decode_frame_exit;
+ /* Get this frame's data
*/
- if (last_undisposed_frame == -1) {
- /* see notes above on transparency vs. background color */
- memset((char*)frame_data, GIF_TRANSPARENT_COLOUR, gif->width * gif->height * sizeof(int));
- } else {
- if ((return_value = gif_decode_frame(gif, last_undisposed_frame)) != GIF_OK)
- goto gif_decode_frame_exit;
- /* Get this frame's data
- */
- assert(gif->bitmap_callbacks.bitmap_get_buffer);
- frame_data = (void *)gif->bitmap_callbacks.bitmap_get_buffer(gif->frame_image);
- if (!frame_data)
- return GIF_INSUFFICIENT_MEMORY;
- }
+ assert(gif->bitmap_callbacks.bitmap_get_buffer);
+ frame_data = (void *)gif->bitmap_callbacks.bitmap_get_buffer(gif->frame_image);
+ if (!frame_data)
+ return GIF_INSUFFICIENT_MEMORY;
+ }
}
gif->decoded_frame = frame;