diff options
author | shennetsind <ind@henn.et> | 2013-02-18 00:30:28 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-02-18 00:30:28 -0300 |
commit | 7e72f0cee8867837be53cb2119b610b00e9bd587 (patch) | |
tree | 22ab404109fb2def22cf0085fcec2bf174210970 /src/common/raconf.c | |
parent | 237d76e7c409251b5fdb9f3eee40ef3fe5dc2b25 (diff) | |
download | hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.gz hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.bz2 hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.tar.xz hercules-7e72f0cee8867837be53cb2119b610b00e9bd587.zip |
Improvements all over the place
Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/raconf.c')
-rw-r--r-- | src/common/raconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/raconf.c b/src/common/raconf.c index 2703560ff..f7d1284b7 100644 --- a/src/common/raconf.c +++ b/src/common/raconf.c @@ -41,12 +41,11 @@ struct conf_value{ static struct conf_value *makeValue(const char *key, char *val, size_t val_len){ struct conf_value *v; - char *p; - size_t sz; +/* size_t sz; sz = sizeof(struct conf_value); if(val_len >= sizeof(v->strval)) - sz += (val_len - sizeof(v->strval) + 1); + sz += (val_len - sizeof(v->strval) + 1);*/ v = (struct conf_value*)aCalloc(1, sizeof(struct conf_value)); if(v == NULL){ @@ -106,6 +105,7 @@ static struct conf_value *makeValue(const char *key, char *val, size_t val_len){ }else if( *val >='0' && *val <= '9'){ // begins with normal digit, so assume its dec. // is it float? bool is_float = false; + char *p; for(p = val; *p != '\0'; p++){ if(*p == '.'){ |