stupid pointer conversions

This commit is contained in:
rsc 2006-02-14 19:41:48 +00:00
parent 3b5862ee5a
commit 0870ded11f
2 changed files with 10 additions and 10 deletions

View file

@ -349,18 +349,18 @@ fsread(Req *r)
logread(r); logread(r);
break; break;
case Qctl: case Qctl:
r->fid->aux = (void*)readlist((int)r->fid->aux, keylist, r); r->fid->aux = (void*)(uintptr)readlist((uintptr)r->fid->aux, keylist, r);
respond(r, nil); respond(r, nil);
break; break;
case Qneedkey: case Qneedkey:
needkeyread(r); needkeyread(r);
break; break;
case Qprotolist: case Qprotolist:
r->fid->aux = (void*)readlist((int)r->fid->aux, protolist, r); r->fid->aux = (void*)(uintptr)readlist((uintptr)r->fid->aux, protolist, r);
respond(r, nil); respond(r, nil);
break; break;
case Qconv: case Qconv:
r->fid->aux = (void*)readlist((int)r->fid->aux, convlist, r); r->fid->aux = (void*)(uintptr)readlist((uintptr)r->fid->aux, convlist, r);
respond(r, nil); respond(r, nil);
break; break;
} }

View file

@ -108,24 +108,24 @@ convthread(void *v)
} }
c->attr = a; c->attr = a;
proto = strfindattr(a, "proto"); proto = strfindattr(a, "proto");
role = strfindattr(a, "role");
if(proto == nil){ if(proto == nil){
werrstr("no proto in attrs"); werrstr("no proto in attrs");
goto out; goto out;
} }
if(role == nil){
werrstr("no role in attrs");
goto out;
}
p = protolookup(proto); p = protolookup(proto);
if(p == nil){ if(p == nil){
werrstr("unknown proto %s", proto); werrstr("unknown proto %s", proto);
goto out; goto out;
} }
c->proto = p; c->proto = p;
role = strfindattr(a, "role");
if(role == nil){
werrstr("no role in attrs");
goto out;
}
for(r=p->roles; r->name; r++){ for(r=p->roles; r->name; r++){
if(strcmp(r->name, role) != 0) if(strcmp(r->name, role) != 0)
continue; continue;