]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tail: shrink internal struct by 8 bytes
authorJim Meyering <meyering@redhat.com>
Fri, 25 Dec 2009 11:08:51 +0000 (12:08 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 26 Dec 2009 08:09:36 +0000 (09:09 +0100)
* tail.c (struct File_spec): Rearrange struct members to decrease
size by 8 bytes to 76,96 on i686,x86_64 respectively.

src/tail.c

index 4ef8d86809d7e73ae35938dd4d91f39f705a0f55..89f37f6de9a518556f7b84f5a4f2c09d51b6088c 100644 (file)
@@ -111,9 +111,6 @@ struct File_spec
   /* The actual file name, or "-" for stdin.  */
   char *name;
 
-  /* File descriptor on which the file is open; -1 if it's not open.  */
-  int fd;
-
   /* Attributes of the file the last time we checked.  */
   off_t size;
   struct timespec mtime;
@@ -121,24 +118,27 @@ struct File_spec
   ino_t ino;
   mode_t mode;
 
-  /* 1 if O_NONBLOCK is clear, 0 if set, -1 if not known.  */
-  int blocking;
-
   /* The specified name initially referred to a directory or some other
      type for which tail isn't meaningful.  Unlike for a permission problem
      (tailable, below) once this is set, the name is not checked ever again.  */
   bool ignore;
 
-  /* See description of DEFAULT_MAX_N_... below.  */
-  uintmax_t n_unchanged_stats;
+  /* See the description of fremote.  */
+  bool remote;
 
   /* A file is tailable if it exists, is readable, and is of type
      IS_TAILABLE_FILE_TYPE.  */
   bool tailable;
 
+  /* File descriptor on which the file is open; -1 if it's not open.  */
+  int fd;
+
   /* The value of errno seen last time we checked this file.  */
   int errnum;
 
+  /* 1 if O_NONBLOCK is clear, 0 if set, -1 if not known.  */
+  int blocking;
+
 #if HAVE_INOTIFY
   /* The watch descriptor used by inotify.  */
   int wd;
@@ -151,8 +151,8 @@ struct File_spec
   size_t basename_start;
 #endif
 
-  /* See the description of fremote.  */
-  bool remote;
+  /* See description of DEFAULT_MAX_N_... below.  */
+  uintmax_t n_unchanged_stats;
 };
 
 #if HAVE_INOTIFY