diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-02-02 21:12:16 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-02-02 21:12:16 +0100 |
commit | 28e811c09c5f32833906a5025137c947b2b7e0f6 (patch) | |
tree | 6a8357408cf85d16a6814a0bee2fbb5c57aa5919 /src/plugins/plugin-config.c | |
parent | d7cc27f713e02c2047f5d6085ec8e5d48b802522 (diff) | |
download | weechat-28e811c09c5f32833906a5025137c947b2b7e0f6.zip |
Use of sizeof(char) in all malloc/realloc for strings
Diffstat (limited to 'src/plugins/plugin-config.c')
-rw-r--r-- | src/plugins/plugin-config.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/plugin-config.c b/src/plugins/plugin-config.c index 95c6b8c7a..957f7dd13 100644 --- a/src/plugins/plugin-config.c +++ b/src/plugins/plugin-config.c @@ -75,8 +75,8 @@ plugin_config_search (char *plugin_name, char *option_name) char *internal_option; struct t_config_option *ptr_option; - internal_option = (char *)malloc (strlen (plugin_name) + - strlen (option_name) + 2); + internal_option = (char *)malloc ((strlen (plugin_name) + + strlen (option_name) + 2) * sizeof (char)); if (!internal_option) return NULL; @@ -223,8 +223,8 @@ plugin_config_set (char *plugin_name, char *option_name, char *value) char *internal_option; int return_code; - internal_option = (char *)malloc (strlen (plugin_name) + - strlen (option_name) + 2); + internal_option = (char *)malloc ((strlen (plugin_name) + + strlen (option_name) + 2) * sizeof (char)); if (!internal_option) return 0; |