From 527de547088056f3bf206dc5dacb273704ff5300 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Sat, 7 Mar 2015 18:29:38 +0100 Subject: [PATCH] Fix error being reported twice If 'stlink_v1_open_inner' returns NULL then 'stlink_v1_open' prints to stderr thus there is no need for the former one to print it also. This removes 'Error: could not open stlink device' being printed twice. --- src/stlink-sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stlink-sg.c b/src/stlink-sg.c index bfe4157..960455b 100644 --- a/src/stlink-sg.c +++ b/src/stlink-sg.c @@ -980,7 +980,7 @@ stlink_t* stlink_v1_open_inner(const int verbose) { ugly_init(verbose); stlink_t *sl = stlink_open(verbose); if (sl == NULL) { - fputs("Error: could not open stlink device\n", stderr); + ELOG("Could not open stlink device\n"); return NULL; } -- 2.30.2