Skip to content

Commit 7142ccf

Browse files
committed
yanglint REFACTOR safety assert
1 parent f6f8e76 commit 7142ccf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/lint/cmd_sid.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "cmd.h"
1818

19+
#include <assert.h>
1920
#include <errno.h>
2021
#include <getopt.h>
2122
#include <stdint.h>
@@ -404,6 +405,7 @@ cmd_sid_exec(struct ly_ctx **ctx, struct yl_opt *yo, const char *posv)
404405
}
405406

406407
if (!sid_file) {
408+
assert(mod);
407409
if (prev) {
408410
/* update */
409411
if (lys_sid_update(mod, prev, status, NULL, &sid_file)) {

0 commit comments

Comments
 (0)