X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fconf-parse.c;h=c828462bb8dfb018c042baab5c6851bd9acf8a08;hb=5a78c3505ae7fa76a061e26676450049ec5946d5;hp=2d93cc4c818625c97780bf46bff251a8138e8766;hpb=6c475b0d66dff5ba9c12b3d1a3bbb16816ce3e2b;p=libucw.git diff --git a/lib/conf-parse.c b/lib/conf-parse.c index 2d93cc4c..c828462b 100644 --- a/lib/conf-parse.c +++ b/lib/conf-parse.c @@ -35,14 +35,14 @@ static const struct unit units[] = { }; static const struct unit * -lookup_unit(const byte *value, const byte *end, byte **msg) +lookup_unit(const char *value, const char *end, char **msg) { if (end && *end) { if (end == value || end[1] || *end >= '0' && *end <= '9') *msg = "Invalid number"; else { for (const struct unit *u=units; u->name; u++) - if (u->name == *end) + if ((char)u->name == *end) return u; *msg = "Invalid unit"; } @@ -52,10 +52,10 @@ lookup_unit(const byte *value, const byte *end, byte **msg) static char cf_rngerr[] = "Number out of range"; -byte * -cf_parse_int(const byte *str, int *ptr) +char * +cf_parse_int(const char *str, int *ptr) { - byte *msg = NULL; + char *msg = NULL; if (!*str) msg = "Missing number"; else { @@ -81,10 +81,10 @@ cf_parse_int(const byte *str, int *ptr) return msg; } -byte * -cf_parse_u64(const byte *str, u64 *ptr) +char * +cf_parse_u64(const char *str, u64 *ptr) { - byte *msg = NULL; + char *msg = NULL; if (!*str) msg = "Missing number"; else { @@ -110,10 +110,10 @@ cf_parse_u64(const byte *str, u64 *ptr) return msg; } -byte * -cf_parse_double(const byte *str, double *ptr) +char * +cf_parse_double(const char *str, double *ptr) { - byte *msg = NULL; + char *msg = NULL; if (!*str) msg = "Missing number"; else { @@ -130,8 +130,8 @@ cf_parse_double(const byte *str, double *ptr) return msg; } -byte * -cf_parse_ip(const byte *p, u32 *varp) +char * +cf_parse_ip(const char *p, u32 *varp) { if (!*p) return "Missing IP address";