if (option (OPTMAILCAPSANITIZE))
mutt_sanitize_filename (type, 0);
- while (command[x] && x < clen && y < sizeof (buf)) {
+ while (command[x] && x < clen && y < ssizeof (buf)) {
if (command[x] == '\\') {
x++;
buf[y++] = command[x++];
int z = 0;
x++;
- while (command[x] && command[x] != '}' && z < sizeof (param))
+ while (command[x] && command[x] != '}' && z < ssizeof (param))
param[z++] = command[x++];
param[z] = '\0';
{
FILE *fp;
char *buf = NULL;
- size_t buflen;
+ ssize_t buflen;
char *ch;
char *field;
int found = FALSE;
btlen = ch - type;
if ((fp = fopen (filename, "r")) != NULL) {
- while (!found && (buf = mutt_read_line (buf, &buflen, fp, &line)) != NULL) {
+ while (!found && (buf = mutt_read_line(buf, &buflen, fp, &line)) != NULL) {
/* ignore comments */
if (*buf == '#')
continue;
* if this is the right entry.
*/
char *test_command = NULL;
- size_t len;
+ ssize_t len;
if (get_field_text (field + 4, &test_command, type, filename, line)
&& test_command) {
while (!found && *curr) {
x = 0;
- while (*curr && *curr != ':' && x < sizeof (path) - 1) {
+ while (*curr && *curr != ':' && x < ssizeof (path) - 1) {
path[x++] = *curr;
curr++;
}
* Returns 1 if newfile specified
*/
-static void strnfcpy (char *d, char *s, size_t siz, size_t len)
-{
- if (len > siz)
- len = siz - 1;
- m_strcpy(d, len, s);
-}
-
int rfc1524_expand_filename (char *nametemplate,
- char *oldfile, char *newfile, size_t nflen)
+ char *oldfile, char *newfile, ssize_t nflen)
{
int i, j, k, ps, r;
char *s;
if (lmatch)
*left = 0;
else
- strnfcpy (left, nametemplate, sizeof (left), i);
+ m_strncpy(left, sizeof(left), nametemplate, i);
if (rmatch)
*right = 0;