Skip to content

Commit

Permalink
libyang3: remove assert in union sort
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 committed Feb 28, 2025
1 parent 5aecc89 commit bd4a123
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions src/libyang3/patch/0006-pr2361-union-sort-assert.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 7e3a7163966d8e4b9e039afff49972838746a868 Mon Sep 17 00:00:00 2001
From: Brad House <[email protected]>
Date: Fri, 28 Feb 2025 16:51:40 -0500
Subject: [PATCH] union: remove assert in sort

Getting assertion in lyplg_type_sort_union(). This assertion
appears invalid as it comes up in test cases in SONiC but when
removed everything passes.

Signed-off-by: Brad House <[email protected]>
---
src/plugins_types/union.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/src/plugins_types/union.c b/src/plugins_types/union.c
index 61dde35d9..b17c04f4b 100644
--- a/src/plugins_types/union.c
+++ b/src/plugins_types/union.c
@@ -531,7 +531,6 @@ lyplg_type_sort_union(const struct ly_ctx *ctx, const struct lyd_value *val1, co
break;
}
}
- assert(rc != 0);

return rc;
}
2 changes: 1 addition & 1 deletion src/libyang3/patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
0003-minmax-errpath-3adb304.patch
0004-union-apptag-529a594.patch
0005-pr2360-validate-union-errors.patch

0006-pr2361-union-sort-assert.patch

0 comments on commit bd4a123

Please sign in to comment.