projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0a90ff
)
Avoid mixed stmt/var declare
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 11 Dec 2012 08:56:09 +0000
(09:56 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 11 Dec 2012 08:56:09 +0000
(09:56 +0100)
util/yaz-url.c
patch
|
blob
|
history
diff --git
a/util/yaz-url.c
b/util/yaz-url.c
index
ed5d8bb
..
03cb63e
100644
(file)
--- a/
util/yaz-url.c
+++ b/
util/yaz-url.c
@@
-43,9
+43,10
@@
static char *get_file(const char *fname, size_t *len)
*len = ftell(inf);
if (*len) /* zero length not considered an error */
{
+ size_t r;
buf = xmalloc(*len);
fseek(inf, 0L, SEEK_SET);
- size_t r = fread(buf, 1, *len, inf);
+ r = fread(buf, 1, *len, inf);
if (r != *len)
{
yaz_log(YLOG_FATAL|YLOG_ERRNO, "short fread of %s", fname);