diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 20:50:16 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 20:50:16 +0200 |
| commit | acc26f85f32c68a51e5cc7b613cd0ea0b0630505 (patch) | |
| tree | 90d68a8292360f0796509f1febc7b66b0a53f4aa /include/apos | |
| parent | 8d90fb3e4a5d02df75584016563ef84901967b9f (diff) | |
| download | kmi-acc26f85f32c68a51e5cc7b613cd0ea0b0630505.tar.gz kmi-acc26f85f32c68a51e5cc7b613cd0ea0b0630505.zip | |
Use #if defined(...) when not guard clause
Diffstat (limited to 'include/apos')
| -rw-r--r-- | include/apos/debug.h | 6 | ||||
| -rw-r--r-- | include/apos/initrd.h | 8 | ||||
| -rw-r--r-- | include/apos/types.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/include/apos/debug.h b/include/apos/debug.h index a9e5d46..ec591ef 100644 --- a/include/apos/debug.h +++ b/include/apos/debug.h @@ -5,7 +5,7 @@ #include <apos/pmem.h> #include <arch/vmem.h> -#ifdef DEBUG +#if defined(DEBUG) enum serial_dev { /* only the NS16550A and compatible at the moment */ NS16550A, @@ -13,13 +13,13 @@ enum serial_dev { void __fmt(1, 2) dbg(const char *fmt, ...); -void init_dbg(void *fdt); +void init_dbg(const void *fdt); void setup_dmap_dbg(); void setup_io_dbg(struct vm_branch *b); void setup_dbg(pm_t pt, enum serial_dev dev); -struct dbg_info dbg_from_fdt(void *fdt); +struct dbg_info dbg_from_fdt(const void *fdt); #define COMMON_FORMAT "[%s] %s:%d\n\t" #define COMMON_ARGS(s) s, __FILE__, __LINE__ diff --git a/include/apos/initrd.h b/include/apos/initrd.h index 4b28ba8..17ed94c 100644 --- a/include/apos/initrd.h +++ b/include/apos/initrd.h @@ -5,10 +5,10 @@ #include <apos/pmem.h> #include <apos/vmem.h> -size_t get_init_size(void *fdt); -vm_t get_init_base(void *fdt); +size_t get_init_size(const void *fdt); +vm_t get_init_base(const void *fdt); -pm_t get_initrdtop(void *fdt); -pm_t get_initrdbase(void *fdt); +pm_t get_initrdtop(const void *fdt); +pm_t get_initrdbase(const void *fdt); #endif /* APOS_INITRD_H */ diff --git a/include/apos/types.h b/include/apos/types.h index 2d9bef1..9b90611 100644 --- a/include/apos/types.h +++ b/include/apos/types.h @@ -58,7 +58,7 @@ typedef intmax_t ssize_t; #define SCHAR_MIN (-__SCHAR_MAX - 1) #define UCHAR_MAX (2 * __SCHAR_MAX__ - 1) -#ifdef __CHAR_UNSIGNED__ +#if defined(__CHAR_UNSIGNED__) #define CHAR_MIN 0 #define CHAR_MAX UCHAR_MAX #else |
