From 5d96cf18ad82e504d898d89dd089e8688ed124c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pinkava?= Date: Sat, 24 Sep 2022 19:32:44 +0200 Subject: [PATCH] Fix memset parametrization --- demod/mod/dfm09mod.c | 2 +- demod/mod/m10mod.c | 2 +- demod/mod/mXXmod.c | 2 +- demod/mod/meisei100mod.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demod/mod/dfm09mod.c b/demod/mod/dfm09mod.c index 07f0b5d..e8c9948 100644 --- a/demod/mod/dfm09mod.c +++ b/demod/mod/dfm09mod.c @@ -1707,7 +1707,7 @@ int main(int argc, char **argv) { int pos = 0; float _frmcnt = -1.0f; - memset(buffer_rawhex, BUFLEN+1, 0); + memset(buffer_rawhex, 0, BUFLEN+1); while ( (ch=fgetc(fp)) != EOF) { diff --git a/demod/mod/m10mod.c b/demod/mod/m10mod.c index b343ca6..e80af15 100644 --- a/demod/mod/m10mod.c +++ b/demod/mod/m10mod.c @@ -1522,7 +1522,7 @@ int main(int argc, char **argv) { while (1 > 0) { - memset(buffer_rawhex, 2*(FRAME_LEN+AUX_LEN)+12, 0); + memset(buffer_rawhex, 0, 2*(FRAME_LEN+AUX_LEN)+12); pbuf = fgets(buffer_rawhex, 2*(FRAME_LEN+AUX_LEN)+12, fp); if (pbuf == NULL) break; buffer_rawhex[2*(FRAME_LEN+AUX_LEN)] = '\0'; diff --git a/demod/mod/mXXmod.c b/demod/mod/mXXmod.c index af3eaa3..072a7eb 100644 --- a/demod/mod/mXXmod.c +++ b/demod/mod/mXXmod.c @@ -1360,7 +1360,7 @@ int main(int argc, char **argv) { while (1 > 0) { - memset(buffer_rawhex, 2*(FRAME_LEN+AUX_LEN)+12, 0); + memset(buffer_rawhex, 0, 2*(FRAME_LEN+AUX_LEN)+12); pbuf = fgets(buffer_rawhex, 2*(FRAME_LEN+AUX_LEN)+12, fp); if (pbuf == NULL) break; buffer_rawhex[2*(FRAME_LEN+AUX_LEN)] = '\0'; diff --git a/demod/mod/meisei100mod.c b/demod/mod/meisei100mod.c index d4264ee..0d73a42 100644 --- a/demod/mod/meisei100mod.c +++ b/demod/mod/meisei100mod.c @@ -702,7 +702,7 @@ int main(int argc, char **argv) { if (!option2 && !option_raw) { jmpRS11: if (reset_gpx) { - memset(&gpx, sizeof(gpx), 0); + memset(&gpx, 0, sizeof(gpx)); sn = -1; freq = -1; reset_gpx = 0; @@ -867,7 +867,7 @@ int main(int argc, char **argv) { else if (option2 && !option_raw) { // iMS-100 jmpIMS: if (reset_gpx) { - memset(&gpx, sizeof(gpx), 0); + memset(&gpx, 0, sizeof(gpx)); gpx.RH = NAN; gpx.T = NAN; sn = -1;