Removed a braindamaged realloc/strcat

This commit is contained in:
Kris Maglione 2006-06-23 19:11:21 -04:00
parent bf2302bb0d
commit 21a0cc12d7
2 changed files with 4 additions and 8 deletions

View File

@ -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)) {

View File

@ -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);
}