From 15f5f89995de6f10a5dc7b30ebf87d856c4e1127 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 27 Jun 2011 11:27:20 -0700 Subject: mtd-utils: remove whitespace at end of lines Signed-off-by: Brian Norris Acked-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- serve_image.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'serve_image.c') diff --git a/serve_image.c b/serve_image.c index f7f6315..38549a1 100644 --- a/serve_image.c +++ b/serve_image.c @@ -2,13 +2,13 @@ #define _POSIX_C_SOURCE 199309 #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include #include #include @@ -83,7 +83,7 @@ int main(int argc, char **argv) fprintf(stderr, "Failed to allocate last-block buffer\n"); exit(1); } - + fec = fec_new(pkts_per_block, total_pkts_per_block); if (!fec) { fprintf(stderr, "Error initialising FEC\n"); @@ -93,7 +93,7 @@ int main(int argc, char **argv) memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_ADDRCONFIG; hints.ai_socktype = SOCK_DGRAM; - + ret = getaddrinfo(argv[1], argv[2], &hints, &ai); if (ret) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(ret)); @@ -167,9 +167,9 @@ int main(int argc, char **argv) fflush(stdout); block_crcs[block_nr] = mtd_crc32(-1, image + (block_nr * erasesize), erasesize); } - + printf("\nImage size %ld KiB (0x%08lx). %d blocks at %d pkts/block\n" - "Estimated transmit time per cycle: %ds\n", + "Estimated transmit time per cycle: %ds\n", (long)st.st_size / 1024, (long) st.st_size, nr_blocks, pkts_per_block, nr_blocks * pkts_per_block * pkt_delay / 1000000); @@ -202,11 +202,11 @@ int main(int argc, char **argv) the first $pkts_per_block are cheap enough though because they're just copies. So alternate between simple and complex stuff, so that we don't start - to choke and fail to keep up with the expected + to choke and fail to keep up with the expected bitrate in the second half of the sequence */ if (block_nr & 1) actualpkt = pkt_nr; - else + else actualpkt = total_pkts_per_block - 1 - pkt_nr; blockptr = image + (erasesize * block_nr); @@ -246,7 +246,7 @@ int main(int argc, char **argv) #endif gettimeofday(&now, NULL); #if 1 - tosleep = nextpkt.tv_usec - now.tv_usec + + tosleep = nextpkt.tv_usec - now.tv_usec + (1000000 * (nextpkt.tv_sec - now.tv_sec)); /* We need hrtimers for this to actually work */ @@ -276,7 +276,7 @@ int main(int argc, char **argv) Adjust our expected timings accordingly. If we're only a little way behind, don't slip yet */ if (now.tv_usec > (now.tv_usec + (5 * pkt_delay) + - 1000000 * (nextpkt.tv_sec - now.tv_sec))) { + 1000000 * (nextpkt.tv_sec - now.tv_sec))) { nextpkt = now; } @@ -291,7 +291,7 @@ int main(int argc, char **argv) writeerrors = 0; - + } } munmap(image, st.st_size); -- cgit v1.2.3