Commit e65b868
pack-objects: use strcspn(3) in name_cmp_len()
Call strcspn(3) to find the length of a string terminated by NUL, NL or
slash instead of open-coding it. Adopt its return type, size_t, to
support strings of arbitrary length. Use that type in callers as well
for variables and function parameters that receive the return value.
Signed-off-by: René Scharfe <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 1b4a38d commit e65b868
1 file changed
+5
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1708 | 1708 | | |
1709 | 1709 | | |
1710 | 1710 | | |
1711 | | - | |
| 1711 | + | |
1712 | 1712 | | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
| 1713 | + | |
1717 | 1714 | | |
1718 | 1715 | | |
1719 | 1716 | | |
1720 | 1717 | | |
1721 | | - | |
| 1718 | + | |
1722 | 1719 | | |
1723 | 1720 | | |
1724 | 1721 | | |
| |||
1743 | 1740 | | |
1744 | 1741 | | |
1745 | 1742 | | |
1746 | | - | |
| 1743 | + | |
1747 | 1744 | | |
1748 | 1745 | | |
1749 | 1746 | | |
| |||
1795 | 1792 | | |
1796 | 1793 | | |
1797 | 1794 | | |
1798 | | - | |
| 1795 | + | |
1799 | 1796 | | |
1800 | 1797 | | |
1801 | 1798 | | |
| |||
0 commit comments