summaryrefslogtreecommitdiff
path: root/riscos/filetype.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-05-26 10:29:01 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-05-26 10:29:01 +0100
commit97e379083dbd56cf5d1b2525c1905df9110e2621 (patch)
tree186a396b4c282d4e606130f5efaaa4256e10d2e5 /riscos/filetype.c
parenta64e0c4eaf3d8a5011d7070136990fe8353754f9 (diff)
downloadnetsurf-97e379083dbd56cf5d1b2525c1905df9110e2621.tar.gz
netsurf-97e379083dbd56cf5d1b2525c1905df9110e2621.tar.bz2
Scope reduce a variable.
Diffstat (limited to 'riscos/filetype.c')
-rw-r--r--riscos/filetype.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/riscos/filetype.c b/riscos/filetype.c
index 86aafa85a..d71c500c0 100644
--- a/riscos/filetype.c
+++ b/riscos/filetype.c
@@ -72,7 +72,7 @@ const char *fetch_filetype(const char *unix_path)
struct type_entry *t;
unsigned int len = strlen(unix_path) + 100;
char *path = calloc(len, 1);
- char *r, *slash;
+ char *r;
os_error *error;
bits file_type, temp;
int objtype;
@@ -110,7 +110,7 @@ const char *fetch_filetype(const char *unix_path)
/* If filetype is text or data, and the file has an extension, try to
* map the extension to a filetype via the MimeMap file. */
if (file_type == osfile_TYPE_TEXT || file_type == osfile_TYPE_DATA) {
- slash = strrchr(path, '/');
+ char *slash = strrchr(path, '/');
if (slash) {
error = xmimemaptranslate_extension_to_filetype(
slash+1, &temp);