diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-03 11:16:07 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-03 11:16:07 +0000 |
commit | fe4b246bb23c21ed4ebe02425b22f4753df0dacf (patch) | |
tree | 3acf634ce34376bf6ae4c69788cdbf393b0c64a1 /src/include/gnunet_configuration_lib.h | |
parent | f6e438ef6e618af3e7320a96e7d08887311635f3 (diff) | |
download | gnunet-fe4b246bb23c21ed4ebe02425b22f4753df0dacf.tar.gz gnunet-fe4b246bb23c21ed4ebe02425b22f4753df0dacf.zip |
Andrew Cann wrote:
Here's a very small patch that changes one of the arguments to
GNUNET_CONFIGURATION_get_value_choice. C++ doesn't allow you to cast
from a (char **) to a (const char **) because that enables overwriting
read-only memory. This patch makes the argument "more const" (which is
always a good thing) and makes it possible to call it from C++ passing
in a (char **).
https://canndrew.org/misc/change_GNUNET_CONFIGURATION_get_value_choice_argument.diff
Diffstat (limited to 'src/include/gnunet_configuration_lib.h')
-rw-r--r-- | src/include/gnunet_configuration_lib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 74f7bf5ce..10cfc4138 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -394,7 +394,7 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct | |||
394 | int | 394 | int |
395 | GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle | 395 | GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle |
396 | *cfg, const char *section, | 396 | *cfg, const char *section, |
397 | const char *option, const char **choices, | 397 | const char *option, const char *const *choices, |
398 | const char **value); | 398 | const char **value); |
399 | 399 | ||
400 | /** | 400 | /** |