diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c index 010ac2d3..6fd89d3a 100644 --- a/cmds/filesystem-usage.c +++ b/cmds/filesystem-usage.c @@ -381,15 +381,15 @@ static void get_raid56_space_info(struct btrfs_ioctl_space_args *sargs, size = info_ptr->size / (info_ptr->num_stripes - parities_count); if (info_ptr->type & BTRFS_BLOCK_GROUP_DATA) { - assert(l_data_ratio >= 0); + ASSERT(l_data_ratio >= 0); *r_data_chunks += size; *r_data_used += size * l_data_ratio; } else if (info_ptr->type & BTRFS_BLOCK_GROUP_METADATA) { - assert(l_metadata_ratio >= 0); + ASSERT(l_metadata_ratio >= 0); *r_metadata_chunks += size; *r_metadata_used += size * l_metadata_ratio; } else if (info_ptr->type & BTRFS_BLOCK_GROUP_SYSTEM) { - assert(l_system_ratio >= 0); + ASSERT(l_system_ratio >= 0); *r_system_chunks += size; *r_system_used += size * l_system_ratio; } diff --git a/cmds/replace.c b/cmds/replace.c index 0af8856d..5d7add37 100644 --- a/cmds/replace.c +++ b/cmds/replace.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -521,7 +520,7 @@ time2string(char *buf, size_t s, __u64 t) time_t t_time_t; t_time_t = (time_t)t; - assert((__u64)t_time_t == t); + ASSERT((__u64)t_time_t == t); localtime_r(&t_time_t, &t_tm); strftime(buf, s, "%e.%b %T", &t_tm); return buf; @@ -531,7 +530,7 @@ static char * progress2string(char *buf, size_t s, int progress_1000) { snprintf(buf, s, "%d.%01d%%", progress_1000 / 10, progress_1000 % 10); - assert(s > 0); + ASSERT(s > 0); buf[s - 1] = '\0'; return buf; } diff --git a/common/units.c b/common/units.c index 94cfa057..698dc1d0 100644 --- a/common/units.c +++ b/common/units.c @@ -79,7 +79,7 @@ int pretty_size_snprintf(u64 size, char *str, size_t str_size, unsigned unit_mod /* Unknown mode */ if (!base) { internal_error("unknown unit base, mode %u", unit_mode); - assert(0); + ASSERT(0); return -1; } @@ -135,7 +135,7 @@ int pretty_size_snprintf(u64 size, char *str, size_t str_size, unsigned unit_mod if (num_divs >= ARRAY_SIZE(unit_suffix_binary)) { str[0] = '\0'; internal_error("unsupported unit suffix, index %d", num_divs); - assert(0); + ASSERT(0); return -1; }