From 8bcb0993848e28d9afb6bcc1468cf9ce42ea596f Mon Sep 17 00:00:00 2001 From: Christian Mehlis Date: Wed, 8 Jan 2014 17:01:22 +0100 Subject: [PATCH] fix some findings by the static analyser --- boards/msba2-common/tools/src/ihex.c | 1 + dist/tools/linux-border_router/testing.c | 2 ++ sys/transceiver/transceiver.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/boards/msba2-common/tools/src/ihex.c b/boards/msba2-common/tools/src/ihex.c index d5865a569a..5f83759fa7 100644 --- a/boards/msba2-common/tools/src/ihex.c +++ b/boards/msba2-common/tools/src/ihex.c @@ -92,6 +92,7 @@ int read_intel_hex(const char *filename) if (*buf) { if (parse_hex_line(buf) == 0) { printf("Warning, parse error line %d\n", lineno); + fclose(fp); return -2; } } diff --git a/dist/tools/linux-border_router/testing.c b/dist/tools/linux-border_router/testing.c index ee504b27bb..abc85f2eaa 100644 --- a/dist/tools/linux-border_router/testing.c +++ b/dist/tools/linux-border_router/testing.c @@ -36,6 +36,8 @@ void init_file(const char *skeleton_file_name, fprintf(stats_file, "%s", line); } } + + fclose(skeleton_file); } int testing_init(const char *stats_file_name, diff --git a/sys/transceiver/transceiver.c b/sys/transceiver/transceiver.c index c09f4c7488..46ab1a8b5d 100644 --- a/sys/transceiver/transceiver.c +++ b/sys/transceiver/transceiver.c @@ -414,8 +414,8 @@ static void receive_packet(uint16_t type, uint8_t pos) receive_at86rf231_packet(trans_p); #else trans_p = NULL; - } #endif + } else if (type == RCV_PKT_NATIVE) { #ifdef MODULE_NATIVENET receive_nativenet_packet(trans_p);