Refactor elf_x86_64_convert_mov_to_lea
[deliverable/binutils-gdb.git] / bfd / cache.c
index 4d46936bcfdb622281aa2ec568b899cbdfbc7254..94a82daff0004da5fa0533a8a714cbc25904a250 100644 (file)
@@ -1,7 +1,6 @@
 /* BFD library -- caching of file descriptors.
 
-   Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002,
-   2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1990-2015 Free Software Foundation, Inc.
 
    Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
 
@@ -82,7 +81,7 @@ bfd_cache_max_open (void)
 #ifdef HAVE_GETRLIMIT
       struct rlimit rlim;
       if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-         && rlim.rlim_cur != RLIM_INFINITY)
+         && rlim.rlim_cur != (rlim_t) RLIM_INFINITY)
        max = rlim.rlim_cur / 8;
       else
 #endif /* HAVE_GETRLIMIT */
@@ -311,7 +310,7 @@ cache_bread_1 (struct bfd *abfd, void *buf, file_ptr nbytes)
   if (nread == (file_ptr)-1)
     {
       bfd_set_error (bfd_error_system_call);
-      return -1;
+      return nread;
     }
 #else
   nread = fread (buf, 1, nbytes, f);
@@ -321,7 +320,7 @@ cache_bread_1 (struct bfd *abfd, void *buf, file_ptr nbytes)
   if (nread < nbytes && ferror (f))
     {
       bfd_set_error (bfd_error_system_call);
-      return -1;
+      return nread;
     }
 #endif
   if (nread < nbytes)
This page took 0.023217 seconds and 4 git commands to generate.