diff options
author | David Sommerseth | 2022-04-20 16:30:50 +0200 |
---|---|---|
committer | Gert Doering | 2022-04-21 09:31:13 +0200 |
commit | abe49856d81f51136d543539202a0bf8fb946474 (patch) | |
tree | 9f69ee496ba9d176531d8f352236aa9c6cf0c8db /sample | |
parent | 9febbcbbcf3b1a786a1e77145d30a43eb7996dc4 (diff) | |
download | openvpn-abe49856d81f51136d543539202a0bf8fb946474.zip openvpn-abe49856d81f51136d543539202a0bf8fb946474.tar.gz |
The Great Reformatting of 2022
It was agreed it was time to do a full reformat fix-up of the whole
source tree again. Over time (since late 2016) small changes has not
adhered to our uncrustify defined coding style. This realigns to our
current standards.
Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220420143050.52790-1-openvpn@sf.lists.topphemmelig.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24123.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'sample')
-rw-r--r-- | sample/sample-plugins/defer/multi-auth.c | 23 | ||||
-rw-r--r-- | sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c | 2 |
2 files changed, 13 insertions, 12 deletions
diff --git a/sample/sample-plugins/defer/multi-auth.c b/sample/sample-plugins/defer/multi-auth.c index 20c9dac..c267298 100644 --- a/sample/sample-plugins/defer/multi-auth.c +++ b/sample/sample-plugins/defer/multi-auth.c @@ -72,7 +72,8 @@ struct plugin_context { /* local wrapping of the log function, to add more details */ static plugin_vlog_t _plugin_vlog_func = NULL; -static void plog(const struct plugin_context *ctx, int flags, char *fmt, ...) +static void +plog(const struct plugin_context *ctx, int flags, char *fmt, ...) { char logid[129]; @@ -243,11 +244,11 @@ do_auth_user_pass(struct plugin_context *context, const char *username, const char *password) { plog(context, PLOG_NOTE, - "expect_user=%s, received_user=%s, expect_passw=%s, received_passw=%s", - np(context->test_valid_user), - np(username), - np(context->test_valid_pass), - np(password)); + "expect_user=%s, received_user=%s, expect_passw=%s, received_passw=%s", + np(context->test_valid_user), + np(username), + np(context->test_valid_pass), + np(password)); if (context->test_valid_user && context->test_valid_pass) { @@ -255,13 +256,13 @@ do_auth_user_pass(struct plugin_context *context, || (strcmp(context->test_valid_pass, password) != 0)) { plog(context, PLOG_ERR, - "User/Password auth result: FAIL"); + "User/Password auth result: FAIL"); return false; } else { plog(context, PLOG_NOTE, - "User/Password auth result: PASS"); + "User/Password auth result: PASS"); return true; } } @@ -282,7 +283,7 @@ auth_user_pass_verify(struct plugin_context *context, { plog(context, PLOG_NOTE, "Direct authentication"); return do_auth_user_pass(context, username, password) ? - OPENVPN_PLUGIN_FUNC_SUCCESS : OPENVPN_PLUGIN_FUNC_ERROR; + OPENVPN_PLUGIN_FUNC_SUCCESS : OPENVPN_PLUGIN_FUNC_ERROR; } /* get auth_control_file filename from envp string array*/ @@ -334,7 +335,7 @@ auth_user_pass_verify(struct plugin_context *context, /* do mighty complicated work that will really take time here... */ plog(context, PLOG_NOTE, "in async/deferred handler, usleep(%d)", - context->test_deferred_auth*1000); + context->test_deferred_auth*1000); usleep(context->test_deferred_auth*1000); /* now signal success state to openvpn */ @@ -342,7 +343,7 @@ auth_user_pass_verify(struct plugin_context *context, if (fd < 0) { plog(context, PLOG_ERR|PLOG_ERRNO, - "open('%s') failed", auth_control_file); + "open('%s') failed", auth_control_file); exit(1); } diff --git a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c index e282041..16648a3 100644 --- a/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c +++ b/sample/sample-plugins/keying-material-exporter-demo/keyingmaterialexporter.c @@ -55,7 +55,7 @@ struct plugin { struct session { char user[48]; - char key [48]; + char key[48]; }; /* |