Fix error being reported twice
authorJakub Tyszkowski <tyszja@gmail.com>
Sat, 7 Mar 2015 17:29:38 +0000 (18:29 +0100)
committerJakub Tyszkowski <tyszja@gmail.com>
Sat, 7 Mar 2015 18:02:44 +0000 (19:02 +0100)
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

index bfe41574cf9c31426cc0061cf97b854c4411d4c8..960455bab14c8db61e6b71efa88ff364345b8134 100644 (file)
@@ -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;
     }