diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-06-18 01:21:31 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-06-18 01:21:31 +0200 |
commit | e2b816986926e91227fc151af99bcf6dd5f68e74 (patch) | |
tree | 266c12ae28dd600266320f01ef5e26d8128d7d10 /lib/parse_ini.c | |
parent | 95ed0a996c84d8df0485b2ffbadf6e92d3fef80f (diff) | |
download | monitoring-plugins-e2b816986926e91227fc151af99bcf6dd5f68e74.tar.gz |
lib/parse_ini.c: Don't cast malloc(3) result
There's no need to cast malloc(3)'s return value.
Diffstat (limited to 'lib/parse_ini.c')
-rw-r--r-- | lib/parse_ini.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/parse_ini.c b/lib/parse_ini.c index 2e42df7c..51ad2c17 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c | |||
@@ -274,11 +274,11 @@ static int add_option(FILE *f, np_arg_list **optlst){ | |||
274 | /* okay, now we have all the info we need, so we create a new np_arg_list | 274 | /* okay, now we have all the info we need, so we create a new np_arg_list |
275 | * element and set the argument... | 275 | * element and set the argument... |
276 | */ | 276 | */ |
277 | optnew=(np_arg_list *)malloc(sizeof(np_arg_list)); | 277 | optnew=malloc(sizeof(np_arg_list)); |
278 | optnew->next=NULL; | 278 | optnew->next=NULL; |
279 | 279 | ||
280 | read_pos=0; | 280 | read_pos=0; |
281 | optnew->arg=(char *)malloc(cfg_len+1); | 281 | optnew->arg=malloc(cfg_len+1); |
282 | /* 1-character params needs only one dash */ | 282 | /* 1-character params needs only one dash */ |
283 | if(opt_len==1) { | 283 | if(opt_len==1) { |
284 | strncpy(&optnew->arg[read_pos], "-", 1); | 284 | strncpy(&optnew->arg[read_pos], "-", 1); |