From: Jakub Tyszkowski Date: Sat, 7 Mar 2015 17:29:38 +0000 (+0100) Subject: Fix error being reported twice X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=527de547088056f3bf206dc5dacb273704ff5300;p=fw%2Fstlink 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. --- 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; }