Operate: commit or revert only if modified UCI list is not empty

This commit is contained in:
Amin Ben Romdhane 2025-10-23 21:04:12 +02:00
parent 165deef400
commit 293474bf1f

View file

@ -47,7 +47,8 @@ void bbfdm_operate_cmd(bbfdm_data_t *data, void *output)
}
/* Commit or Revert changes in uci files */
if (data->bbf_ctx.modified_uci_head != NULL) {
if (data->bbf_ctx.modified_uci_head != NULL &&
!list_empty(data->bbf_ctx.modified_uci_head)) {
struct dm_modified_uci *m;
struct blob_buf bb = {0};