X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fipaccess.c;h=5dd388ccd36ee0a5a68c71c47656650458629d13;hb=5a78c3505ae7fa76a061e26676450049ec5946d5;hp=215fb5345f4e8b9b08abab86f566b512daaa5fdb;hpb=707fc4ba760bac1d356c0268e933885f9da1f616;p=libucw.git diff --git a/lib/ipaccess.c b/lib/ipaccess.c index 215fb534..5dd388cc 100644 --- a/lib/ipaccess.c +++ b/lib/ipaccess.c @@ -22,8 +22,8 @@ struct ipaccess_entry { struct ip_addrmask addr; }; -static byte * -addrmask_parser(byte *c, void *ptr) +static char * +addrmask_parser(char *c, void *ptr) { /* * This is tricky: addrmasks will be compared by memcmp(), so we must ensure @@ -32,10 +32,10 @@ addrmask_parser(byte *c, void *ptr) struct ip_addrmask *am = ptr; bzero(am, sizeof(*am)); - byte *p = strchr(c, '/'); + char *p = strchr(c, '/'); if (p) *p++ = 0; - byte *err = cf_parse_ip(c, &am->addr); + char *err = cf_parse_ip(c, &am->addr); if (err) return err; if (p) @@ -68,7 +68,7 @@ struct cf_user_type ip_addrmask_type = { struct cf_section ipaccess_cf = { CF_TYPE(struct ipaccess_entry), CF_ITEMS { - CF_LOOKUP("Mode", PTR_TO(struct ipaccess_entry, allow), ((byte*[]) { "deny", "allow", NULL })), + CF_LOOKUP("Mode", PTR_TO(struct ipaccess_entry, allow), ((char*[]) { "deny", "allow", NULL })), CF_USER("IP", PTR_TO(struct ipaccess_entry, addr), &ip_addrmask_type), CF_END } @@ -110,7 +110,7 @@ int main(int argc, char **argv) byte buf[256]; while (fgets(buf, sizeof(buf), stdin)) { - byte *c = strchr(buf, '\n'); + char *c = strchr(buf, '\n'); if (c) *c = 0; u32 ip;