# HG changeset patch # User Andre Heinecke # Date 1398676735 0 # Node ID 7f2cb85288d06eb4067683f623717ab83d2350ef # Parent e551de11d8b6a7cc20c3b4af68fa7b858c56a43c Move printlasterror into logging diff -r e551de11d8b6 -r 7f2cb85288d0 cinst/nssstore_win.c --- a/cinst/nssstore_win.c Mon Apr 28 09:18:07 2014 +0000 +++ b/cinst/nssstore_win.c Mon Apr 28 09:18:55 2014 +0000 @@ -61,15 +61,6 @@ #define PROCESS_TIMEOUT 30000 -#define PRINTLASTERROR(msg) \ - char *my_error = getLastErrorMsg(); \ - if (my_error) { \ - DEBUGPRINTF(msg " : %s\n", my_error); \ - ERRORPRINTF(msg" : %s\n", my_error); \ - free (my_error); \ - } \ - DEBUGPRINTF ("Failed to get error information\n"); - /**@brief Write strv of instructions to a handle * * Writes the null terminated list of instructions to diff -r e551de11d8b6 -r 7f2cb85288d0 common/logging.h --- a/common/logging.h Mon Apr 28 09:18:07 2014 +0000 +++ b/common/logging.h Mon Apr 28 09:18:55 2014 +0000 @@ -17,6 +17,8 @@ * @brief Logging and debugging functions */ +#include + #ifdef WIN32 #include @@ -81,6 +83,13 @@ */ #define ERRORPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "ERROR: " fmt, ##__VA_ARGS__); +#define PRINTLASTERROR(msg) \ + char *my_error = getLastErrorMsg(); \ + if (my_error) { \ + ERRORPRINTF(msg" : %s\n", my_error); \ + free (my_error); \ + } \ + ERRORPRINTF ("Failed to get error information\n"); #ifdef __cplusplus