Add more error checking and improved readability

This commit is contained in:
justtryingthingsout authored and Nick Chan committed 2023-04-20 20:47:37 +08:00
1 parent fe565b97ad
commit a9e72b579e
12 files changed
+240 -234

No files matched your search

+1 -11
View File
@@ -122,18 +122,8 @@ struct kpfinfo {
options = (checkrain_option_t)(options & ~option); \
} while (0);
static inline bool checkrain_option_enabled(checkrain_option_t flags, checkrain_option_t opt)
static inline bool checkrain_options_enabled(checkrain_option_t flags, checkrain_option_t opt)
{
if(flags == checkrain_option_failure)
{
switch(opt)
{
case checkrain_option_safemode:
return true;
default:
return false;
}
}
return (flags & opt) != 0;
}