From 0abc7946c1b0e357d76d9b294ab0dd04a173e573 Mon Sep 17 00:00:00 2001 From: Steven Tracey Date: Fri, 22 Nov 2024 11:46:05 -0500 Subject: [PATCH] Semicolons and pointers --- c/src/p2fa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/c/src/p2fa.c b/c/src/p2fa.c index ad7ee8b..eb388d7 100644 --- a/c/src/p2fa.c +++ b/c/src/p2fa.c @@ -124,11 +124,11 @@ void config(UWORD *blackImage, char* configName) { if (ch == 'q') return; } -void drawTotpHome(UWORD *blackImage, char** configNames) { +void drawTotpHome(UWORD *blackImage, char** configNames, int *length) { Paint_NewImage(blackImage, EPD_2in13_V4_WIDTH, EPD_2in13_V4_HEIGHT, 0, WHITE); Paint_SelectImage(blackImage); Paint_Clear(WHITE); - for (int j = 0; j < length; j++) { + for (int j = 0; j < *length; j++) { if (configNames[j] == NULL) { DebugLine(13, 0, "Null Config: %d\n", j); } @@ -151,7 +151,7 @@ void totpHome(UWORD *blackImage) { return; } - drawTotpHome(blackImage, configNames); + drawTotpHome(blackImage, configNames, &length); int i = 0; Paint_DrawString(115, 5 + (i * 20), "<", &Font12, WHITE, BLACK); @@ -174,11 +174,11 @@ void totpHome(UWORD *blackImage) { case '\n': timeout(0); code(blackImage, configNames[i]); - drawTotpHome(blackImage, configNames); + drawTotpHome(blackImage, configNames, &length); break; case 'c': config(blackImage, configNames[i]); - drawTotpHome(blackImage, configNames); + drawTotpHome(blackImage, configNames, &length); break; case 'q': return; @@ -216,7 +216,7 @@ int drawLoop() { int main() { signal(SIGINT, Handler); - signal(SIGTERM, Handler) + signal(SIGTERM, Handler); initscr(); cbreak();