]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
prop.c: refactor PT_U32 split-int parsing to use prop_intsplit_from_str
authorcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Tue, 5 May 2026 11:44:42 +0000 (11:44 +0000)
committerFlole <Flole998@users.noreply.github.com>
Tue, 5 May 2026 15:27:44 +0000 (17:27 +0200)
Agent-Logs-Url: https://github.com/tvheadend/tvheadend/sessions/21b0e984-5867-49d1-8142-861f4b00d7c4

Co-authored-by: Flole998 <9951871+Flole998@users.noreply.github.com>
src/prop.c

index e4047292c7b421341a36e03c2b6436daa39cead0..661b89d8ae8cac11c5f3203cc043929bbd60d6b0 100644 (file)
@@ -146,12 +146,9 @@ prop_write_values
       }
       case PT_U32: {
         if (p->intextra && INTEXTRA_IS_SPLIT(p->intextra)) {
-          const char *s;
           if (!(snew = htsmsg_field_get_str(f)))
             continue;
-          u32 = atol(snew) * p->intextra;
-          if ((s = strchr(snew, '.')) != NULL)
-            u32 += (atol(s + 1) % p->intextra);
+          u32 = (uint32_t)prop_intsplit_from_str(snew, p->intextra);
         } else {
           if (htsmsg_field_get_u32(f, &u32))
             continue;