Always pass format string as a third argument to util_finish. Although this is not
necessary, since 'buffer' is guaranteed to contain a normal error string, without format specifiers, yet this will simplify maintainence.
Showing
3 changed files
with
3 additions
and
3 deletions
... | @@ -37,7 +37,7 @@ imap4d_copy (struct imap4d_command *command, char *arg) | ... | @@ -37,7 +37,7 @@ imap4d_copy (struct imap4d_command *command, char *arg) |
37 | state = new_state; | 37 | state = new_state; |
38 | return util_send ("%s %s\r\n", command->tag, buffer); | 38 | return util_send ("%s %s\r\n", command->tag, buffer); |
39 | } | 39 | } |
40 | return util_finish (command, rc, buffer); | 40 | return util_finish (command, rc, "%s", buffer); |
41 | } | 41 | } |
42 | 42 | ||
43 | int | 43 | int | ... | ... |
... | @@ -128,7 +128,7 @@ imap4d_fetch (struct imap4d_command *command, char *arg) | ... | @@ -128,7 +128,7 @@ imap4d_fetch (struct imap4d_command *command, char *arg) |
128 | char buffer[64]; | 128 | char buffer[64]; |
129 | 129 | ||
130 | rc = imap4d_fetch0 (arg, 0, buffer, sizeof buffer); | 130 | rc = imap4d_fetch0 (arg, 0, buffer, sizeof buffer); |
131 | return util_finish (command, rc, buffer); | 131 | return util_finish (command, rc, "%s", buffer); |
132 | } | 132 | } |
133 | 133 | ||
134 | /* Where the real implementation is. It is here since UID command also | 134 | /* Where the real implementation is. It is here since UID command also | ... | ... |
... | @@ -29,7 +29,7 @@ imap4d_store (struct imap4d_command *command, char *arg) | ... | @@ -29,7 +29,7 @@ imap4d_store (struct imap4d_command *command, char *arg) |
29 | char buffer[64]; | 29 | char buffer[64]; |
30 | 30 | ||
31 | rc = imap4d_store0 (arg, 0, buffer, sizeof buffer); | 31 | rc = imap4d_store0 (arg, 0, buffer, sizeof buffer); |
32 | return util_finish (command, rc, buffer); | 32 | return util_finish (command, rc, "%s", buffer); |
33 | } | 33 | } |
34 | 34 | ||
35 | int | 35 | int | ... | ... |
-
Please register or sign in to post a comment