]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
cleanup: str_*case(t_strdup_noconst(str)) -> t_str_*case(str)
authorTimo Sirainen <tss@iki.fi>
Mon, 24 May 2004 22:35:55 +0000 (01:35 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 May 2004 22:35:55 +0000 (01:35 +0300)
--HG--
branch : HEAD

src/imap-login/client.c
src/imap/client.c
src/imap/imap-sort.c
src/master/mail-process.c
src/pop3-login/client.c
src/pop3/commands.c

index 6ef5cb1927b913e9a83810b19819b3527d57f3c8..a576f241f24cb9a271267a801262c5c06bc169b7 100644 (file)
@@ -168,7 +168,7 @@ static int cmd_logout(struct imap_client *client)
 static int client_command_execute(struct imap_client *client, const char *cmd,
                                  struct imap_arg *args)
 {
-       cmd = str_ucase(t_strdup_noconst(cmd));
+       cmd = t_str_ucase(cmd);
        if (strcmp(cmd, "LOGIN") == 0)
                return cmd_login(client, args);
        if (strcmp(cmd, "AUTHENTICATE") == 0)
index 744b39d017d522d8a0b906010546156ac261d53f..5c255d3996d8fc77ab9c7828a13d54a71f3ceefb 100644 (file)
@@ -163,7 +163,7 @@ void client_send_command_error(struct client *client, const char *msg)
        else if (client->cmd_name == NULL)
                error = t_strconcat("BAD Error in IMAP command: ", msg, NULL);
        else {
-               cmd = str_ucase(t_strdup_noconst(client->cmd_name));
+               cmd = t_str_ucase(client->cmd_name);
                error = t_strconcat("BAD Error in IMAP command ",
                                    cmd, ": ", msg, NULL);
        }
index 7d9f95fe9a20620be415901aa02f79bae41e1fc3..403fd7c7d2a82e881e4b5abb3f1497dda084df0d 100644 (file)
@@ -313,7 +313,7 @@ static void mail_sort_check_flush(struct sort_context *ctx, struct mail *mail)
        if (ctx->common_mask & MAIL_SORT_CC) {
                str = get_first_mailbox(mail, "cc");
                if (str != NULL)
-                       str = str_ucase(t_strdup_noconst(str));
+                       str = t_str_ucase(str);
 
                if (null_strcmp(str, ctx->last_cc) != 0) {
                        i_free(ctx->last_cc);
@@ -333,7 +333,7 @@ static void mail_sort_check_flush(struct sort_context *ctx, struct mail *mail)
        if (ctx->common_mask & MAIL_SORT_FROM) {
                str = get_first_mailbox(mail, "from");
                if (str != NULL)
-                       str = str_ucase(t_strdup_noconst(str));
+                       str = t_str_ucase(str);
 
                if (null_strcmp(str, ctx->last_from) != 0) {
                        i_free(ctx->last_from);
@@ -367,7 +367,7 @@ static void mail_sort_check_flush(struct sort_context *ctx, struct mail *mail)
        if (ctx->common_mask & MAIL_SORT_TO) {
                str = get_first_mailbox(mail, "to");
                if (str != NULL)
-                       str = str_ucase(t_strdup_noconst(str));
+                       str = t_str_ucase(str);
 
                if (null_strcmp(str, ctx->last_to) != 0) {
                        i_free(ctx->last_to);
@@ -430,7 +430,7 @@ static void mail_sort_input(struct sort_context *ctx, struct mail *mail)
                else {
                        str = get_first_mailbox(mail, "cc");
                        if (str != NULL)
-                               str = str_ucase(t_strdup_noconst(str));
+                               str = t_str_ucase(str);
                }
                str = string_table_get(ctx, str);
 
@@ -444,7 +444,7 @@ static void mail_sort_input(struct sort_context *ctx, struct mail *mail)
                else {
                        str = get_first_mailbox(mail, "from");
                        if (str != NULL)
-                               str = str_ucase(t_strdup_noconst(str));
+                               str = t_str_ucase(str);
                }
                str = string_table_get(ctx, str);
 
@@ -458,7 +458,7 @@ static void mail_sort_input(struct sort_context *ctx, struct mail *mail)
                else {
                        str = get_first_mailbox(mail, "to");
                        if (str != NULL)
-                               str = str_ucase(t_strdup_noconst(str));
+                               str = t_str_ucase(str);
                }
                str = string_table_get(ctx, str);
 
@@ -592,7 +592,7 @@ static const char *get_str(enum mail_sort_type type, const unsigned char *buf,
                }
 
                if (str != NULL)
-                       str = str_ucase(t_strdup_noconst(str));
+                       str = t_str_ucase(str);
                return str;
        }
 
index c500581a4da4fe687733e1cfd3998d7dca0360db..20f85c72d3a0ed8012c7d42375989c9579cbc602 100644 (file)
@@ -95,7 +95,7 @@ get_var_expand_table(const char *user, const char *home,
        tab[1].value = t_strcut(user, '@');
        tab[2].value = strchr(user, '@');
        if (tab[2].value != NULL) tab[2].value++;
-       tab[3].value = str_ucase(t_strdup_noconst(process_names[process_type]));
+       tab[3].value = t_str_ucase(process_names[process_type]);
        tab[4].value = home;
 
        return tab;
index 52f4e5d685951292cd839ae1ad44d8926e764233..44ed53ac7b188247b14738af898cd5d7bb0b5139 100644 (file)
@@ -113,7 +113,7 @@ static int cmd_quit(struct pop3_client *client)
 static int client_command_execute(struct pop3_client *client, const char *cmd,
                                  const char *args)
 {
-       cmd = str_ucase(t_strdup_noconst(cmd));
+       cmd = t_str_ucase(cmd);
        if (strcmp(cmd, "CAPA") == 0)
                return cmd_capa(client, args);
        if (strcmp(cmd, "USER") == 0)
index 13db0c6b05bb723a93d1ec0b302ed748cf5faf05..bea8e2c8f765ad8910048b25ccfc6e567255772b 100644 (file)
@@ -431,7 +431,7 @@ int client_command_execute(struct client *client,
                            const char *name, const char *args)
 {
        /* keep the command uppercased */
-       name = str_ucase(t_strdup_noconst(name));
+       name = t_str_ucase(name);
 
        while (*args == ' ') args++;