fixed send command

This commit is contained in:
Anselm R. Garbe 2006-06-19 15:49:11 +02:00
parent 61e4d38f66
commit 3078597d0a
2 changed files with 6 additions and 4 deletions

View File

@ -648,7 +648,7 @@ fs_write(Req *r) {
case FsFBorder:
data_to_cstring(r);
i = (unsigned int)strtol((char *)r->ifcall.data, &buf, 10);
if(*buf)
if(buf)
return respond(r, Ebadvalue);
def.border = i;
return respond(r, nil);

View File

@ -371,12 +371,14 @@ view_index(View *v) {
Client *
client_of_message(char *message, unsigned int *next)
{
unsigned int i, n;
unsigned int i;
Client *c;
if(!strncmp(message, "sel ", 4))
if(!strncmp(message, "sel ", 4)) {
*next = 4;
return sel_client();
if((1 != sscanf(message, "%d %n", &i, &n)))
}
if((1 != sscanf(message, "%d %n", &i, next)))
return nil;
for(c=client; i && c; c=c->next, i--);
return c;