]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(tail): Explicitly cast to long the N_UNITS argumennt in
authorJim Meyering <jim@meyering.net>
Wed, 12 Jul 1995 02:59:44 +0000 (02:59 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 12 Jul 1995 02:59:44 +0000 (02:59 +0000)
call to tail_lines.  Otherwise, NetBSD lost because N_UNITS (of type
off_t, a 64-bit type on NetBSD) wasn't converted to the target type,
long.  Reported by Dan Hagerty (hag@gnu.ai.it.edu).

src/tail.c

index c4dc378c5c0e045e6ead4fe8d51494e6b5870f10..448c3557148cfbb7f8355f480f58250c33c8d0b5 100644 (file)
@@ -447,7 +447,7 @@ tail (filename, fd, n_units)
      off_t n_units;
 {
   if (count_lines)
-    return tail_lines (filename, fd, n_units);
+    return tail_lines (filename, fd, (long) n_units);
   else
     return tail_bytes (filename, fd, n_units);
 }