diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-06-02 08:14:14 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-06-02 08:14:14 +0000 |
| commit | ad2ec32e1cbe6122b023b29baeaf84a530fcc6a9 (patch) | |
| tree | eff0e25621385c394af8459fb9156b13fac0d49d /twiddle.c | |
| parent | 09c396b8a863340de1f54536eb193eb2a9b28cb5 (diff) | |
| download | puzzles-ad2ec32e1cbe6122b023b29baeaf84a530fcc6a9.zip puzzles-ad2ec32e1cbe6122b023b29baeaf84a530fcc6a9.tar.gz puzzles-ad2ec32e1cbe6122b023b29baeaf84a530fcc6a9.tar.bz2 puzzles-ad2ec32e1cbe6122b023b29baeaf84a530fcc6a9.tar.xz | |
Fix various departures from C found by `gcc -ansi -pedantic'. I
haven't checked in Makefile changes to enable this, but I'll at
least fix the specific problems it found when enabled as a one-off.
[originally from svn r5902]
Diffstat (limited to 'twiddle.c')
| -rw-r--r-- | twiddle.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -260,12 +260,12 @@ static void do_rotate(int *grid, int w, int h, int n, int orientable, for (j = 0; j < n/2; j++) { int k; int g[4]; - int p[4] = { - j*w+i, - i*w+(n-j-1), - (n-j-1)*w+(n-i-1), - (n-i-1)*w+j - }; + int p[4]; + + p[0] = j*w+i; + p[1] = i*w+(n-j-1); + p[2] = (n-j-1)*w+(n-i-1); + p[3] = (n-i-1)*w+j; for (k = 0; k < 4; k++) g[k] = grid[p[k]]; |