diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-05-30 23:02:02 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-05-30 23:02:02 +0100 |
commit | 0b39a3750c20463a1a4d8e4b5a62caeb72464cf8 (patch) | |
tree | 04f577bfc5554552ac8f25b510bbfd11e61adfd3 /riscos/textselection.c | |
parent | ef8b0e82044df2b62b41abd3652565c1d5330cfe (diff) | |
download | netsurf-0b39a3750c20463a1a4d8e4b5a62caeb72464cf8.tar.gz netsurf-0b39a3750c20463a1a4d8e4b5a62caeb72464cf8.tar.bz2 |
Reduce scope of a few variables.
Diffstat (limited to 'riscos/textselection.c')
-rw-r--r-- | riscos/textselection.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/riscos/textselection.c b/riscos/textselection.c index 5215a62c9..2c8520425 100644 --- a/riscos/textselection.c +++ b/riscos/textselection.c @@ -392,9 +392,6 @@ bool ro_gui_selection_prepare_paste_dataload( wimp_full_message_data_xfer *dataxfer) { FILE *fp; - long size; - char *local_cb; - nserror ret; /* Ignore messages that aren't for us */ if (dataxfer->your_ref == 0 || dataxfer->your_ref != paste_prev_message) @@ -402,13 +399,15 @@ bool ro_gui_selection_prepare_paste_dataload( fp = fopen(dataxfer->file_name, "r"); if (fp != NULL) { + long size; fseek(fp, 0, SEEK_END); size = ftell(fp); fseek(fp, 0, SEEK_SET); if (size > 0) { - local_cb = malloc(size); + char *local_cb = malloc(size); if (local_cb != NULL) { + nserror ret; fread(local_cb, 1, size, fp); ret = utf8_from_local_encoding(local_cb, size, |