From 221b3d2981d8ae15b73e925619ee7082bb23fc6f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 20 Jan 2017 11:24:04 +0100 Subject: blind-extend: less brackets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-extend.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/blind-extend.c') 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, ""); } -- cgit v1.2.3-70-g09d2