Skip to content

Commit

Permalink
Trap null version when reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycurtis committed Sep 21, 2022
1 parent 19f8795 commit a654cb6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/shmemu/deprecate.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,19 @@ shmemu_deprecate(const char *fn_name, const shmemu_version_t *vp)

kh_value(table, k) = true;

logger(LOG_DEPRECATE,
"\"%s\" is deprecated as of specification %d.%d",
fn_name,
vp->major, vp->minor
);
if (vp != NULL) {
logger(LOG_DEPRECATE,
"\"%s\" is deprecated as of specification %d.%d",
fn_name,
vp->major, vp->minor
);
}
else {
logger(LOG_DEPRECATE,
"\"%s\" is deprecated",
fn_name
);
}
}

void
Expand Down

0 comments on commit a654cb6

Please sign in to comment.