Automatic date update in version.in
[external/binutils.git] / bfd / bfdio.c
index 136fa8b..1f4caca 100644 (file)
@@ -330,6 +330,10 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
   if (direction != SEEK_CUR)
     position += offset;
 
+  if ((direction == SEEK_CUR && position == 0)
+      || (direction == SEEK_SET && (ufile_ptr) position == abfd->where))
+    return 0;
+
   result = abfd->iovec->bseek (abfd, position, direction);
   if (result != 0)
     {