From 440efef8bf6719281ae096b190534a597221e3ea Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Mon, 17 Sep 2018 03:40:08 +0000 Subject: [PATCH] Tweaked C code to avoid unnecessary array initialization. --- c/qrcodegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/qrcodegen.c b/c/qrcodegen.c index 32c631e..289b581 100644 --- a/c/qrcodegen.c +++ b/c/qrcodegen.c @@ -329,7 +329,7 @@ testable void initializeFunctionModules(int version, uint8_t qrcode[]) { fillRectangle(0, qrsize - 8, 9, 8, qrcode); // Fill numerous alignment patterns - uint8_t alignPatPos[7] = {0}; + uint8_t alignPatPos[7]; int numAlign = getAlignmentPatternPositions(version, alignPatPos); for (int i = 0; i < numAlign; i++) { for (int j = 0; j < numAlign; j++) { @@ -373,7 +373,7 @@ static void drawWhiteFunctionModules(uint8_t qrcode[], int version) { } // Draw numerous alignment patterns - uint8_t alignPatPos[7] = {0}; + uint8_t alignPatPos[7]; int numAlign = getAlignmentPatternPositions(version, alignPatPos); for (int i = 0; i < numAlign; i++) { for (int j = 0; j < numAlign; j++) {