Skip to contentSkip to conversation

Fix const declarations in plug-in v3 structs

PATCH New David Sommerseth 1 participant 1 message Apr 29, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix const declarations in plug-in v3 structs

Microsoft Visual Studio complains about const char const **ptr declarations and expects them to be be const char ** const ptr. The latter is what was the intention, that neither the pointer nor the value(s) it points at can be changed.

---
 openvpn-plugin.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
openvpn-plugin.h +4 -4
index 5c82daf..24aa36c 100644
@@ -203,8 +203,8 @@ struct openvpn_plugin_string_list
 struct openvpn_plugin_args_open_in
 {
   const int type_mask;
-  const char const **argv;
-  const char const **envp;
+  const char ** const argv;
+  const char ** const envp;
 };
 
 
@@ -267,8 +267,8 @@ struct openvpn_plugin_args_open_return
 struct openvpn_plugin_args_func_in
 {
   const int type;
-  const char const **argv;
-  const char const **envp;
+  const char ** const argv;
+  const char ** const envp;
   openvpn_plugin_handle_t handle;
   void *per_client_context;
   int current_cert_depth;
Signature · 1 line
1.7.4.4