Merge pull request #12533 from donaldsharp/returns_are_needed

lib, staticd: return values even after an assert
This commit is contained in:
Mark Stapp 2022-12-16 12:42:14 -05:00 committed by GitHub
commit 17cb0eaa09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -257,6 +257,7 @@ bool zlog_file_set_filename(struct zlog_cfg_file *zcf, const char *filename)
return zlog_file_cycle(zcf); return zlog_file_cycle(zcf);
} }
assert(0); assert(0);
return false;
} }
bool zlog_file_set_fd(struct zlog_cfg_file *zcf, int fd) bool zlog_file_set_fd(struct zlog_cfg_file *zcf, int fd)
@ -271,6 +272,7 @@ bool zlog_file_set_fd(struct zlog_cfg_file *zcf, int fd)
return zlog_file_cycle(zcf); return zlog_file_cycle(zcf);
} }
assert(0); assert(0);
return false;
} }
struct rcu_close_rotate { struct rcu_close_rotate {
@ -544,6 +546,7 @@ int zlog_syslog_get_facility(void)
return syslog_facility; return syslog_facility;
} }
assert(0); assert(0);
return 0;
} }
void zlog_syslog_set_prio_min(int prio_min) void zlog_syslog_set_prio_min(int prio_min)
@ -581,4 +584,5 @@ int zlog_syslog_get_prio_min(void)
return syslog_prio_min; return syslog_prio_min;
} }
assert(0); assert(0);
return 0;
} }

View File

@ -313,6 +313,7 @@ static bool static_zebra_nht_get_prefix(const struct static_nexthop *nh,
} }
assertf(0, "BUG: someone forgot to add nexthop type %u", nh->type); assertf(0, "BUG: someone forgot to add nexthop type %u", nh->type);
return false;
} }
void static_zebra_nht_register(struct static_nexthop *nh, bool reg) void static_zebra_nht_register(struct static_nexthop *nh, bool reg)