Clean up MFS a bit:
- Remove unused includes. - Add include guards to headers. - Use unsigned variables in case they're never going to hold a negative value. This causes GCC's complaints to disappear and should make flexelint a lot happier, too. - Make functions private when they're used only within a module. - Remove unused variables. - Add casts where appropriate.
This commit is contained in:
@@ -150,6 +150,7 @@
|
||||
/* Some limits. */
|
||||
#define MAX_INODE_NR ((ino_t) 037777777777) /* largest inode number */
|
||||
#define MAX_FILE_POS ((off_t) 0x7FFFFFFF) /* largest legal file offset */
|
||||
#define UMAX_FILE_POS ((unsigned) 0x7FFFFFF) /* largest legal file offset */
|
||||
|
||||
#define MAX_SYM_LOOPS 8 /* how many symbolic links are recursed */
|
||||
|
||||
@@ -158,6 +159,8 @@
|
||||
#define NO_ZONE ((zone_t) 0) /* absence of a zone number */
|
||||
#define NO_DEV ((dev_t) 0) /* absence of a device numb */
|
||||
#define NO_LINK ((nlink_t) 0) /* absence of incoming links */
|
||||
#define INVAL_UID ((uid_t) -1) /* invalid uid value */
|
||||
#define INVAL_GID ((gid_t) -1) /* invalid gid value */
|
||||
|
||||
#define SERVARNAME "cttyline"
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_DEVA, STYLE_TTY, STYLE_CTTY,
|
||||
# define IS_KLOG_DEV 0 /* minor device for /dev/klog */
|
||||
|
||||
/* Full device numbers that are special to the boot monitor and FS. */
|
||||
# define DEV_RAM 0x0100 /* device number of /dev/ram */
|
||||
# define DEV_IMGRD 0x0106 /* device number of /dev/imgrd */
|
||||
# define DEV_RAM ((dev_t) 0x0100) /* device number of /dev/ram */
|
||||
# define DEV_IMGRD ((dev_t) 0x0106) /* device number of /dev/imgrd */
|
||||
|
||||
#endif /* _DMAP_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user