Mercurial > trustbridge
diff common/logging.c @ 905:698b6a9bd75e
Fix coding style for C code
astyle --style=gnu --indent=spaces=2
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 13 Aug 2014 15:49:47 +0200 |
parents | 2303caf56dbb |
children |
line wrap: on
line diff
--- a/common/logging.c Wed Aug 13 15:44:35 2014 +0200 +++ b/common/logging.c Wed Aug 13 15:49:47 2014 +0200 @@ -137,10 +137,11 @@ (LPWSTR) &bufPtr, 0, NULL); } } - if (!bufPtr) { - fprintf (stderr, "Error getting last error for code: %lx \n", err); - return NULL; - } + if (!bufPtr) + { + fprintf (stderr, "Error getting last error for code: %lx \n", err); + return NULL; + } retval = wchar_to_utf8(bufPtr, wcslen(bufPtr)); LocalFree (bufPtr); @@ -217,22 +218,22 @@ fingerprint[32*3] = '\0'; #ifdef WIN32 - { - wchar_t *wstrings[3]; - - wstrings[0] = utf8_to_wchar (subject, strnlen (subject, MAX_LOG)); - wstrings[1] = utf8_to_wchar (fingerprint, strnlen (fingerprint, MAX_LOG)); - wstrings[2] = utf8_to_wchar (store, strnlen (store, MAX_LOG)); + { + wchar_t *wstrings[3]; - win_do_log (EVENTLOG_INFORMATION_TYPE, - EVENT_CAT_CINST, - install ? MSG_CERT_INSTALL : MSG_CERT_REMOVE, - 3, - (const WCHAR**) wstrings); - xfree (wstrings[0]); - xfree (wstrings[1]); - xfree (wstrings[2]); - } + wstrings[0] = utf8_to_wchar (subject, strnlen (subject, MAX_LOG)); + wstrings[1] = utf8_to_wchar (fingerprint, strnlen (fingerprint, MAX_LOG)); + wstrings[2] = utf8_to_wchar (store, strnlen (store, MAX_LOG)); + + win_do_log (EVENTLOG_INFORMATION_TYPE, + EVENT_CAT_CINST, + install ? MSG_CERT_INSTALL : MSG_CERT_REMOVE, + 3, + (const WCHAR**) wstrings); + xfree (wstrings[0]); + xfree (wstrings[1]); + xfree (wstrings[2]); + } #else /* Please keep the following line in line with message from events.mc */ syslog_info_printf ("%s of root certificate: %s Sha256 thumbprint:<%s>. Certificate store \"%s\"",