mirror of
https://github.com/0intro/wmii
synced 2024-11-25 23:30:24 +03:00
Removed a braindamaged realloc/strcat
This commit is contained in:
parent
bf2302bb0d
commit
21a0cc12d7
@ -246,19 +246,14 @@ parse_colors(char **buf, int *buflen, BlitzColor *col) {
|
||||
}
|
||||
|
||||
char *
|
||||
message_root(char *message)
|
||||
message_root(char **data)
|
||||
{
|
||||
unsigned int n;
|
||||
|
||||
if(!strncmp(message, "quit", 5)) {
|
||||
srv.running = 0;
|
||||
return nil;
|
||||
}
|
||||
if(!strchr(message, ' ')) {
|
||||
message = realloc(message, strlen(message) + 2);
|
||||
strcat(message, " ");
|
||||
}
|
||||
if(!strncmp(message, "view ", 5)) {
|
||||
}if(!strncmp(message, "view ", 5)) {
|
||||
select_view(&message[5]);
|
||||
return nil;
|
||||
}if(!strncmp(message, "selcolors ", 10)) {
|
||||
|
@ -62,7 +62,8 @@ xcreate(char *file)
|
||||
fprintf(stderr, "wmiir: cannot create file '%s': %s\n", p, c.errstr);
|
||||
return -1;
|
||||
}
|
||||
write_data(fid);
|
||||
if(!(c.fcall.qid.type&P9DMDIR))
|
||||
write_data(fid);
|
||||
return ixp_client_close(&c, fid);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user