Any error other than bfd_error_wrong_format returned from object_p()
is effectively a fatal error.
* vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
error. Remove redundant bfd_set_error.
+2014-08-29 Alan Modra <amodra@gmail.com>
+
+ * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
+ error. Remove redundant bfd_set_error.
+
2014-08-29 Alan Modra <amodra@gmail.com>
* srec.c (srec_scan): Revert last change. Report an error for
PRIV (recrd.rec) = buf;
if (bfd_bread (buf, test_len, abfd) != test_len)
- {
- bfd_set_error (bfd_error_file_truncated);
- goto error_ret;
- }
+ goto err_wrong_format;
/* Is it an image? */
if ((bfd_getl32 (buf) == EIHD__K_MAJORID)
if (buf == NULL)
{
PRIV (recrd.buf) = NULL;
- bfd_set_error (bfd_error_no_memory);
goto error_ret;
}
PRIV (recrd.buf) = buf;
while (remaining > 0)
{
if (bfd_bread (buf + read_so_far, to_read, abfd) != to_read)
- {
- bfd_set_error (bfd_error_file_truncated);
- goto err_wrong_format;
- }
+ goto err_wrong_format;
read_so_far += to_read;
remaining -= to_read;