Use simpler loop.
authorMikko Värri <vmj@linuxbox.fi>
Sun, 28 Aug 2011 21:43:59 +0000 (00:43 +0300)
committerMikko Värri <vmj@linuxbox.fi>
Sun, 28 Aug 2011 21:43:59 +0000 (00:43 +0300)
genmac.c

index fefac19..b44a1ee 100644 (file)
--- a/genmac.c
+++ b/genmac.c
@@ -177,7 +177,7 @@ main(int argc, char** argv)
         printf("%02x", byte);
 
         /* Rest of the bytes can be fully random */
-        for (int i = 1; i < config.count; i++)
+        while(--config.count)
                 printf(":%02x", (uint8_t)rand());
 
         printf("\n");