* cache.c (cache_bread_1): Don't return -1 when fread returns
a positive value.
+2014-07-15 Alan Modra <amodra@gmail.com>
+
+ * cache.c (cache_bread_1): Don't return -1 when fread returns
+ a positive value.
+
2014-07-15 Alan Modra <amodra@gmail.com>
* elflink.c (elf_merge_st_other): Update comments. Simplify
if (nread == (file_ptr)-1)
{
bfd_set_error (bfd_error_system_call);
- return -1;
+ return nread;
}
#else
nread = fread (buf, 1, nbytes, f);
if (nread < nbytes && ferror (f))
{
bfd_set_error (bfd_error_system_call);
- return -1;
+ return nread;
}
#endif
if (nread < nbytes)