Skip to content

Commit 8108afa

Browse files
committed
path REFACTOR redunant check
1 parent fcd168e commit 8108afa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/path.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,12 +707,10 @@ ly_path_compile_predicate(const struct ly_ctx *ctx, const struct lysc_node *cur_
707707
}
708708

709709
/* store the value */
710-
if (key) {
711-
LOG_LOCSET(key, NULL);
712-
}
710+
LOG_LOCSET(key, NULL);
713711
ret = lyd_value_store(ctx, &p->value, ((struct lysc_node_leaf *)key)->type, val, val_len, 0, 0,
714712
NULL, format, prefix_data, LYD_HINT_DATA, key, NULL);
715-
LOG_LOCBACK(key ? 1 : 0, 0);
713+
LOG_LOCBACK(1, 0);
716714
LY_CHECK_ERR_GOTO(ret, p->value.realtype = NULL, cleanup);
717715

718716
/* "allocate" the type to avoid problems when freeing the value after the type was freed */

0 commit comments

Comments
 (0)