aboutsummaryrefslogtreecommitdiffstats
path: root/src/dired.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-05-19 02:17:26 +0000
committerRichard M. Stallman <[email protected]>1997-05-19 02:17:26 +0000
commit4c637faa2450d3ee867cbb0fabfb57213817a2f7 (patch)
tree5f30009d65ee47655ac793018faecf312dcda262 /src/dired.c
parentecb4dd9a350f1f36aca706d03f7cc1a9d50b5b23 (diff)
(Ffile_attributes): Return inode number as a cons only if necessary.
Diffstat (limited to 'src/dired.c')
-rw-r--r--src/dired.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dired.c b/src/dired.c
index a10e94931f..ea0624dd53 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -685,14 +685,14 @@ If file does not exist, returns nil.")
#ifdef BSD4_3
#undef BSD4_2 /* ok, you can look again without throwing up */
#endif
-#if 1
- /* To allow inode numbers larger than VALBITS, separate the bottom
- 16 bits. */
- values[10] = Fcons (make_number (s.st_ino >> 16),
- make_number (s.st_ino & 0xffff));
-#else
- values[10] = make_number (s.st_ino);
-#endif
+ if (s.st_ino & ((-1) << VALBITS))
+ /* To allow inode numbers larger than VALBITS, separate the bottom
+ 16 bits. */
+ values[10] = Fcons (make_number (s.st_ino >> 16),
+ make_number (s.st_ino & 0xffff));
+ else
+ /* But keep the most common cases as integers. */
+ values[10] = make_number (s.st_ino);
values[11] = make_number (s.st_dev);
return Flist (sizeof(values) / sizeof(values[0]), values);
}