summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-09-12 17:52:39 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-09-12 17:52:39 +0200
commit7073f48bcfa823d0906f409cf3836a0fa46d9894 (patch)
tree029891463b575262be922e51cc592824d09b1337
parente8ab09ac246806106a77a333246f42f3ce9ce835 (diff)
remove unneeded temp variable
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--fb-helper.c.in4
1 files changed, 1 insertions, 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);