summaryrefslogtreecommitdiff
path: root/riscos/wimp.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-03-27 01:14:42 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-03-27 01:14:42 +0000
commite97bc3b1786e009cf46177eb5d0c17e52f627631 (patch)
tree1b3f94484e6f2cc2f536d405e84bd3934bc07433 /riscos/wimp.c
parentbe6d60c5555713ef04c3141db51d2d1d7a111ce7 (diff)
downloadnetsurf-e97bc3b1786e009cf46177eb5d0c17e52f627631.tar.gz
netsurf-e97bc3b1786e009cf46177eb5d0c17e52f627631.tar.bz2
Squash warnings. Tidy code. Make last_sprite_found static and locally scoped.
svn path=/trunk/netsurf/; revision=6907
Diffstat (limited to 'riscos/wimp.c')
-rw-r--r--riscos/wimp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/riscos/wimp.c b/riscos/wimp.c
index 087473539..40ffee38d 100644
--- a/riscos/wimp.c
+++ b/riscos/wimp.c
@@ -50,8 +50,6 @@ static int ro_gui_strncmp(const char *s1, const char *s2, size_t len);
static wimpextend_furniture_sizes furniture_sizes;
static wimp_w furniture_window = NULL;
-unsigned char last_sprite_found[16];
-
/**
* Gets the horizontal scrollbar height
*
@@ -788,10 +786,11 @@ osspriteop_area *ro_gui_load_sprite_file(const char *pathname)
bool ro_gui_wimp_sprite_exists(const char *sprite)
{
+ static char last_sprite_found[16];
os_error *error;
/* make repeated calls fast */
- if (!strncmp(sprite, last_sprite_found, 16))
+ if (!strncmp(sprite, last_sprite_found, sizeof(last_sprite_found)))
return true;
/* fallback if not known to exist */
@@ -804,7 +803,7 @@ bool ro_gui_wimp_sprite_exists(const char *sprite)
}
return false;
}
- snprintf(last_sprite_found, 16, sprite);
+ snprintf(last_sprite_found, sizeof(last_sprite_found), sprite);
return true;
}