From ebed18a2052305e0ce007020f41080c2c2768222 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 26 Jan 2023 17:46:39 +0100 Subject: [PATCH] Reduce scope of fname and message --- org/qmckl_error.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org/qmckl_error.org b/org/qmckl_error.org index 0ee7719..046680d 100644 --- a/org/qmckl_error.org +++ b/org/qmckl_error.org @@ -627,10 +627,10 @@ qmckl_exit_code qmckl_check(qmckl_context context, qmckl_exit_code rc) { - char fname[QMCKL_MAX_FUN_LEN]; - char message[QMCKL_MAX_MSG_LEN]; - if (rc != QMCKL_SUCCESS) { + char fname[QMCKL_MAX_FUN_LEN]; + char message[QMCKL_MAX_MSG_LEN]; + fprintf(stderr, "===========\nQMCKL ERROR\n%s\n", qmckl_string_of_error(rc)); qmckl_get_error(context, &rc, fname, message); fprintf(stderr, "Function: %s\nMessage: %s\n===========\n", fname, message);