X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=init.c;h=6ca24b377334e76c148e6ea3dc3df87712e25c1c;hb=46874ad2a0d0a6a66e4bfec16dfa349bf07c632a;hp=88d3423f658b2fe7cd8f7341d70ca556aca9e102;hpb=2ea77d3b2827ba23feb756ce2fb936565ae38998;p=apps%2Fmadmutt.git diff --git a/init.c b/init.c index 88d3423..6ca24b3 100644 --- a/init.c +++ b/init.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -1619,7 +1620,7 @@ static struct option_t* add_user_option (const char* name) { /* free()'s option_t* */ static void del_option (void* p) { - struct option_t* ptr = (struct option_t*) p; + struct option_t *ptr = (struct option_t*) p; char* s = (char*) ptr->data; debug_print (1, ("removing option '%s' from table\n", NONULL (ptr->option))); p_delete(&ptr->option); @@ -2281,7 +2282,7 @@ int mutt_command_complete (char *buffer, size_t len, int pos, int numtabs) Matches[(numtabs - 2) % Num_matched]); /* return the completed command */ - strncpy (buffer, Completed, len - spaces); + m_strcpy(buffer, len - spaces, Completed); } else if (!str_ncmp (buffer, "set", 3) || !str_ncmp (buffer, "unset", 5) @@ -2329,7 +2330,7 @@ int mutt_command_complete (char *buffer, size_t len, int pos, int numtabs) snprintf (Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % Num_matched]); - strncpy (pt, Completed, buffer + len - pt - spaces); + m_strcpy(pt, buffer + len - pt - spaces, Completed); } else if (!str_ncmp (buffer, "exec", 4)) { struct binding_t *menu = km_get_table (CurrentMenu); @@ -2373,7 +2374,7 @@ int mutt_command_complete (char *buffer, size_t len, int pos, int numtabs) snprintf (Completed, sizeof(Completed), "%s", Matches[(numtabs - 2) % Num_matched]); - strncpy (pt, Completed, buffer + len - pt - spaces); + m_strcpy(pt, buffer + len - pt - spaces, Completed); } else return 0; @@ -2685,9 +2686,9 @@ void mutt_init (int skip_sys_rc, LIST * commands) Spoolfile = m_strdup(p); else { #ifdef HOMESPOOL - mutt_concat_path (buffer, NONULL (Homedir), MAILPATH, sizeof(buffer)); + mutt_concat_path(buffer, sizeof(buffer), NONULL(Homedir), MAILPATH); #else - mutt_concat_path (buffer, MAILPATH, NONULL (Username), sizeof(buffer)); + mutt_concat_path(buffer, sizeof(buffer), MAILPATH, NONULL(Username)); #endif Spoolfile = m_strdup(buffer); }