366eced core/transaction: make merge_unit_ids() always return NUL-terminated string

Authored and Committed by Yu Watanabe a year ago
    core/transaction: make merge_unit_ids() always return NUL-terminated string
    
    Follow-up for 924775e8ce49817f96df19c2b06356c12ecfc754.
    
    The loop run with `STRV_FOREACH_PAIR()`, hence `if (*(unit_id+1))` is
    not a good way to detect if there exist a next entry.
    
    Fixes #26872.
    
        
file modified
+10 -7