X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnulib%2Fftruncate.c;fp=gnulib%2Fftruncate.c;h=33b69d81076040bb128f0555d9e230f34e66ec6a;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=ff7d11b090a4f41760885dd15cbbd00e344c80fe;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/gnulib/ftruncate.c b/gnulib/ftruncate.c index ff7d11b..33b69d8 100644 --- a/gnulib/ftruncate.c +++ b/gnulib/ftruncate.c @@ -38,11 +38,11 @@ ftruncate (int fd, off_t length) { /* Extend file length. */ if (lseek (fd, (length - 1), SEEK_SET) < 0) - return -1; + return -1; /* Write a "0" byte. */ if (write (fd, "", 1) != 1) - return -1; + return -1; } else { @@ -52,14 +52,14 @@ ftruncate (int fd, off_t length) fl.l_whence = 0; fl.l_len = 0; fl.l_start = length; - fl.l_type = F_WRLCK; /* write lock on file space */ + fl.l_type = F_WRLCK; /* write lock on file space */ /* This relies on the *undocumented* F_FREESP argument to fcntl, - which truncates the file so that it ends at the position - indicated by fl.l_start. Will minor miracles never cease? */ + which truncates the file so that it ends at the position + indicated by fl.l_start. Will minor miracles never cease? */ if (fcntl (fd, F_FREESP, &fl) < 0) - return -1; + return -1; } return 0;