diff options
author | Aaron Schrab <aaron+mutt@schrab.com> | 2013-10-05 19:25:00 +0000 |
---|---|---|
committer | Aaron Schrab <aaron+mutt@schrab.com> | 2013-10-05 19:25:00 +0000 |
commit | e9ccf68935301787aed21b822dc5d1390257ec73 (patch) | |
tree | eaebe8bdc17bc0490edb65d963363f840fae7934 /hook.c | |
parent | be1044cde367c67a4dc2438459863f71bac66e7d (diff) |
Consistently use mutt_buffer_init function
Despite the existence of the mutt_buffer_init function, most
initializations were instead done with memset. Use the specific
function instead to make it easier if later changes are made to how the
initialization should be done.
Diffstat (limited to 'hook.c')
-rw-r--r-- | hook.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -52,8 +52,8 @@ int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) pattern_t *pat = NULL; char path[_POSIX_PATH_MAX]; - memset (&pattern, 0, sizeof (pattern)); - memset (&command, 0, sizeof (command)); + mutt_buffer_init (&pattern); + mutt_buffer_init (&command); if (*s->dptr == '!') { @@ -284,7 +284,7 @@ void mutt_folder_hook (char *path) err.dsize = STRING; err.data = safe_malloc (err.dsize); - memset (&token, 0, sizeof (token)); + mutt_buffer_init (&token); for (; tmp; tmp = tmp->next) { if(!tmp->command) @@ -335,7 +335,7 @@ void mutt_message_hook (CONTEXT *ctx, HEADER *hdr, int type) err.dsize = STRING; err.data = safe_malloc (err.dsize); - memset (&token, 0, sizeof (token)); + mutt_buffer_init (&token); for (hook = Hooks; hook; hook = hook->next) { if(!hook->command) @@ -478,7 +478,7 @@ void mutt_account_hook (const char* url) err.dsize = STRING; err.data = safe_malloc (err.dsize); - memset (&token, 0, sizeof (token)); + mutt_buffer_init (&token); for (hook = Hooks; hook; hook = hook->next) { |