1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/drivers/shtcx: don't repeat last string on error

This commit is contained in:
Benjamin Valentin 2023-08-02 15:58:05 +02:00
parent 683041979b
commit df79422dce

View File

@ -20,6 +20,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "timex.h"
#include "ztimer.h"
@ -51,6 +52,9 @@ int main(void)
len = fmt_s16_dfp(str_hum, hum, -2);
str_hum[len] = '\0';
} else {
strcpy(str_temp, "ERROR");
strcpy(str_hum, "ERROR");
}
/* print values to STDIO */
printf("Temperature [°C]: %s\n", str_temp);