[X2Go-Commits] [libx2goclient] 97/132: src/x2goclient-utils.{c, h}: have x2goclient_bool_to_str () return const gchar *, since it's a static string.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 3 15:26:33 CET 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit b086b8a4841b7da07238d86e59fd74947e528a5d
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Sep 30 01:58:13 2021 +0200
src/x2goclient-utils.{c,h}: have x2goclient_bool_to_str () return const gchar *, since it's a static string.
---
src/x2goclient-utils.c | 6 +++---
src/x2goclient-utils.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c
index 59e7c6c..5f61dad 100644
--- a/src/x2goclient-utils.c
+++ b/src/x2goclient-utils.c
@@ -270,12 +270,12 @@ gchar* x2goclient_strbrk_dup (gchar * restrict * const haystack, const char need
*
* Takes a boolean and converts it to a (static) string.
*
- * Returns: (transfer none): the converted value as a string
+ * Returns: (transfer none): the converted value as a static string
*
* Since: 0.0.0
*/
-gchar* x2goclient_bool_to_str (const gboolean in) {
- gchar *ret = "false";
+const gchar* x2goclient_bool_to_str (const gboolean in) {
+ const gchar *ret = "false";
if (in) {
ret = "true";
diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h
index dad8037..5295495 100644
--- a/src/x2goclient-utils.h
+++ b/src/x2goclient-utils.h
@@ -137,7 +137,7 @@ void x2goclient_clear_strings (gpointer const data);
long long x2goclient_str_to_int (const gchar * const restrict str, const _Bool min, const long long int limit_min, const _Bool max, const long long int limit_max, const gchar ** const restrict end, _Bool * const restrict conv_err, _Bool * const restrict min_err, _Bool * const restrict max_err);
gchar* x2goclient_strbrk_dup (gchar * restrict * const haystack, const char needle, const _Bool free_orig, gsize * const new_size);
-gchar* x2goclient_bool_to_str (const gboolean in);
+const gchar* x2goclient_bool_to_str (const gboolean in);
G_END_DECLS
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
More information about the x2go-commits
mailing list