From 7073f48bcfa823d0906f409cf3836a0fa46d9894 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 12 Sep 2011 17:52:39 +0200 Subject: remove unneeded temp variable Signed-off-by: Florian Pritz --- fb-helper.c.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fb-helper.c.in b/fb-helper.c.in index 4a6ff28..75553a2 100644 --- a/fb-helper.c.in +++ b/fb-helper.c.in @@ -38,7 +38,6 @@ int load_file(const char *fn, char **data, size_t *data_size) { FILE *fp; size_t buf_size = 1024*1024; /* use 1MiB chunks */ - int size = 0; fp = fopen(fn, "rb"); if (fp == NULL) { @@ -53,8 +52,7 @@ int load_file(const char *fn, char **data, size_t *data_size) perror("load_file"); return 1; } - size = fread(*data + *data_size, sizeof(char), buf_size, fp); - *data_size += size; + *data_size += fread(*data + *data_size, sizeof(char), buf_size, fp); } fclose(fp); -- cgit v1.2.3-24-g4f1b