Looks like there were a couple of SA warnings lurking; fix
them.
Signed-off-by: Mark Stapp <mjs@cisco.com>
/* remove trailing '/'s */
while (darr_len(ys->xpath) > 1 && ys->xpath[darr_len(ys->xpath) - 2] == '/') {
darr_setlen(ys->xpath, darr_len(ys->xpath) - 1);
- *darr_last(ys->xpath) = 0;
+ if (darr_last(ys->xpath))
+ *darr_last(ys->xpath) = 0;
}
ys->xpath_orig = darr_strdup(xpath);
ys->translator = translator;
*/
struct rip_info *rip_ecmp_delete(struct rip *rip, struct rip_info *rinfo)
{
- struct route_node *rp = rinfo->rp;
- struct list *list = (struct list *)rp->info;
+ struct route_node *rp;
+ struct list *list;
+
+ if (rinfo == NULL)
+ return NULL;
+
+ rp = rinfo->rp;
+ list = (struct list *)rp->info;
EVENT_OFF(rinfo->t_timeout);