commit e3e8e36ba610558ae6f451acc16079c9b9bd3103
parent c004026de23bc4ee1a951075bca99d0ebd07489c
Author: Kyle Milz <kmilz@ucalgary.ca>
Date: Tue, 25 Sep 2012 15:51:17 -0600
squash unused return val warning
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/utilities.c b/src/utilities.c
@@ -1025,6 +1025,7 @@ void
userscript_hooks_start(const char *uri)
{
// const char *js;
+ int r;
printf("userscript_hooks_start() uri = %s\n", uri);
@@ -1053,12 +1054,13 @@ userscript_hooks_start(const char *uri)
int len = ftell(fp);
char *buf = malloc(len);
rewind(fp);
- fread(buf, len, 1, fp);
+ r = fread(buf, len, 1, fp);
fclose(fp);
parse(buf);
- free(buf);
+ if (!r)
+ free(buf);
// files_to_parse = eina_list_append(files_to_parse, full_path);
// printf("would have parsed %s\n", full_path);
}