[gnome-control-center] printers: Fix missing const on string parameter
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Fix missing const on string parameter
- Date: Wed, 11 May 2022 00:24:53 +0000 (UTC)
commit f9fd2587ca0ba2b766ee159394ab0dd65dbc335a
Author: Robert Ancell <robert ancell canonical com>
Date: Wed May 11 12:09:25 2022 +1200
printers: Fix missing const on string parameter
panels/printers/pp-utils.c | 2 +-
panels/printers/pp-utils.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
index 4cd22e3f4..750b634c6 100644
--- a/panels/printers/pp-utils.c
+++ b/panels/printers/pp-utils.c
@@ -3638,7 +3638,7 @@ shift_string_left (gchar *str)
}
gboolean
-printer_name_is_valid (gchar *str)
+printer_name_is_valid (const gchar *str)
{
const gchar *invalid_chars = " \t#/";
return strlen(str) == strcspn(str, invalid_chars);
diff --git a/panels/printers/pp-utils.h b/panels/printers/pp-utils.h
index 50c48c0cf..332cda4e7 100644
--- a/panels/printers/pp-utils.h
+++ b/panels/printers/pp-utils.h
@@ -258,6 +258,6 @@ gchar *canonicalize_device_name (GList *device_names,
void shift_string_left (gchar *str);
-gboolean printer_name_is_valid (gchar *str);
+gboolean printer_name_is_valid (const gchar *str);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]