Skip to content

Commit

Permalink
S_uiv_2buf: code quality improvements suggested in GH#22927
Browse files Browse the repository at this point in the history
  • Loading branch information
richardleach committed Jan 19, 2025
1 parent f0f3175 commit fca15f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sv_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -1055,14 +1055,13 @@ S_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const pe
word_ptr = (U16*)ptr;
word_table = (U16*)Perl_int2str_table.arr;

if (UNLIKELY(is_uv))
if (is_uv)
sign = 0;
else if (iv >= 0) {
uv = iv;
sign = 0;
} else {
/* Using 0- here to silence bogus warning from MS VC */
uv = (UV) (0 - (UV) iv);
uv = NEGATE_2UV(iv);
sign = 1;
}

Expand Down

0 comments on commit fca15f2

Please sign in to comment.