Commit 0b1fac3
committed
builtin-apply.c: get rid of an unnecessary use of temporary array
Instead of allocating a temporary array imglen[], copying contents to it
from another array img->line[], and then using imglen[], use the value
from img->line[], whose value does not change during the whole process.
This incidentally removes a use of C99 variable length array, which some
older compilers apparently are not happy with.
Signed-off-by: Junio C Hamano <[email protected]>1 parent dcda361 commit 0b1fac3
1 file changed
+6
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1875 | 1875 | | |
1876 | 1876 | | |
1877 | 1877 | | |
1878 | | - | |
1879 | 1878 | | |
1880 | 1879 | | |
| 1880 | + | |
1881 | 1881 | | |
1882 | | - | |
1883 | | - | |
1884 | | - | |
1885 | | - | |
| 1882 | + | |
| 1883 | + | |
1886 | 1884 | | |
1887 | 1885 | | |
1888 | | - | |
1889 | | - | |
| 1886 | + | |
| 1887 | + | |
1890 | 1888 | | |
1891 | 1889 | | |
1892 | 1890 | | |
| |||
1900 | 1898 | | |
1901 | 1899 | | |
1902 | 1900 | | |
1903 | | - | |
| 1901 | + | |
1904 | 1902 | | |
1905 | 1903 | | |
1906 | 1904 | | |
| |||
0 commit comments