Merge pull request #49 from pinkavaj/pi-memset-fix

Fix memset parametrization
pull/50/head
rs1729 2022-09-24 19:51:31 +02:00 zatwierdzone przez GitHub
commit bf9e5323db
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -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)
{

Wyświetl plik

@ -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';

Wyświetl plik

@ -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';

Wyświetl plik

@ -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;