]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth-client: auth-master - Move is_valid_string()
authorStephan Bosch <stephan.bosch@dovecot.fi>
Mon, 2 Oct 2017 09:43:28 +0000 (11:43 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 27 Aug 2025 11:34:57 +0000 (13:34 +0200)
src/lib-auth-client/auth-master.c

index 780824f106c706084d7139f9f9f3818f44930971..b5728feacc895973aa9a8e3134f69f635b4a2947 100644 (file)
@@ -355,19 +355,6 @@ static void auth_master_unset_io(struct auth_master_connection *conn)
        }
 }
 
-static bool is_valid_string(const char *str)
-{
-       const char *p;
-
-       /* make sure we're not sending any characters that have a special
-          meaning. */
-       for (p = str; *p != '\0'; p++) {
-               if (*p == '\t' || *p == '\n' || *p == '\r')
-                       return FALSE;
-       }
-       return TRUE;
-}
-
 static int auth_master_run_cmd_pre(struct auth_master_connection *conn,
                                   const char *cmd)
 {
@@ -447,6 +434,19 @@ auth_master_next_request_id(struct auth_master_connection *conn)
        return conn->request_counter;
 }
 
+static bool is_valid_string(const char *str)
+{
+       const char *p;
+
+       /* make sure we're not sending any characters that have a special
+          meaning. */
+       for (p = str; *p != '\0'; p++) {
+               if (*p == '\t' || *p == '\n' || *p == '\r')
+                       return FALSE;
+       }
+       return TRUE;
+}
+
 static const char *const *args_hide_passwords(const char *const *args)
 {
        ARRAY_TYPE(const_string) new_args;