diff options
author | Jim Meyering <jim@meyering.net> | 2006-08-09 09:45:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-08-09 09:45:17 +0000 |
commit | a5e7cc0811dcf543078c0f7f79fa159232a0ea6f (patch) | |
tree | 897f740a980ebdc9a7e7b05d3d987632043ca0f8 /src | |
parent | ff7f318ae13493351ec56e073a32df702cfc0356 (diff) | |
download | coreutils-a5e7cc0811dcf543078c0f7f79fa159232a0ea6f.tar.xz |
Add a compile-time check to ensure that filetype
and filetype_letter have the same number of elements.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -162,9 +162,12 @@ enum filetype /* Display letters and indicators for each filetype. Keep these in sync with enum filetype. */ - static char const filetype_letter[] = "?pcdb-lswd"; +/* Ensure that filetype and filetype_letter have the same + number of elements. */ +verify (sizeof filetype_letter - 1 == arg_directory + 1); + #define FILETYPE_INDICATORS \ { \ C_ORPHAN, C_FIFO, C_CHR, C_DIR, C_BLK, C_FILE, \ |