aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-20 11:24:04 +0100
committerMattias Andrée <maandree@kth.se>2017-01-20 11:33:23 +0100
commit221b3d2981d8ae15b73e925619ee7082bb23fc6f (patch)
treeb297f8e185f85a0aca20c652497cc4f90e2bcd3a /src
parentFix blind-crop (diff)
downloadblind-221b3d2981d8ae15b73e925619ee7082bb23fc6f.tar.gz
blind-221b3d2981d8ae15b73e925619ee7082bb23fc6f.tar.bz2
blind-221b3d2981d8ae15b73e925619ee7082bb23fc6f.tar.xz
blind-extend: less brackets
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src')
-rw-r--r--src/blind-extend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/blind-extend.c b/src/blind-extend.c
index 71be7f0..4331ae3 100644
--- a/src/blind-extend.c
+++ b/src/blind-extend.c
@@ -77,8 +77,8 @@ main(int argc, char *argv[])
right *= stream.pixel_size;
rown = stream.width * stream.pixel_size;
- xoff = (rown - (left % rown)) % rown;
- yoff = (stream.height - (top % stream.height)) % stream.height;
+ xoff = (rown - left % rown) % rown;
+ yoff = (stream.height - top % stream.height) % stream.height;
memcpy(buf, stream.buf, ptr = stream.ptr);
while (eread_frame(&stream, buf, n)) {
@@ -88,11 +88,11 @@ main(int argc, char *argv[])
} else {
for (y = 0; y < stream.height; y++)
for (x = 0; x < imgw; x++)
- image[x + (y + top) * imgw] = buf[((x + xoff) % rown) + y * rown];
+ image[x + (y + top) * imgw] = buf[(x + xoff) % rown + y * rown];
for (y = 0; y < top; y++)
- memcpy(image + y * imgw, image + (((y + yoff) % stream.height) + top) * imgw, imgw);
+ memcpy(image + y * imgw, image + ((y + yoff) % stream.height + top) * imgw, imgw);
for (y = top + stream.height; y < h; y++)
- memcpy(image + y * imgw, image + (((y + yoff) % stream.height) + top) * imgw, imgw);
+ memcpy(image + y * imgw, image + ((y + yoff) % stream.height + top) * imgw, imgw);
}
ewriteall(STDOUT_FILENO, image, m, "<stdout>");
}