Signed-off-by: F. Aragon <paco@voltanet.io>
zlog_debug(
"%s: starting mpath update, newbest %s num candidates %d old-mpath-count %d",
pfx_buf, new_best ? new_best->peer->host : "NONE",
- listcount(mp_list), old_mpath_count);
+ mp_list ? listcount(mp_list) : 0, old_mpath_count);
/*
* We perform an ordered walk through both lists in parallel.
int rfapiCliGetPrefixAddr(struct vty *vty, const char *str, struct prefix *p)
{
if (!str2prefix(str, p)) {
- vty_out(vty, "Malformed address \"%s\"%s", str, HVTYNL);
+ vty_out(vty, "Malformed address \"%s\"%s", str ? str : "null",
+ HVTYNL);
return CMD_WARNING;
}
switch (p->family) {
{
int ret;
+ if (!str || !p)
+ return 0;
+
/* First we try to convert string to struct prefix_ipv4. */
ret = str2prefix_ipv4(str, (struct prefix_ipv4 *)p);
if (ret)