Readline: Cleanup some warnings
[deliverable/binutils-gdb.git] / readline / histfile.c
index fffeb3fd319e1b5328fd3c1c0f2cf639c9d2d588..56cbbf0498cea34540a2f3eb58a3ee71ec8d2617 100644 (file)
@@ -407,7 +407,8 @@ history_truncate_file (fname, lines)
      truncate to. */
   if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
     {
-      write (file, bp, chars_read - (bp - buffer));
+      if (write (file, bp, chars_read - (bp - buffer)) < 0)
+       rv = errno;
 
 #if defined (__BEOS__)
       /* BeOS ignores O_TRUNC. */
This page took 0.024648 seconds and 4 git commands to generate.