revert ramfs example

the code was correct. erealloc9p() terminates the process
on error, but the code was handling realloc() error explicitely
and responded the request with Enomem error.
This commit is contained in:
cinap_lenrek 2014-06-11 18:01:20 +02:00
parent b4c3726381
commit 3a5b2189ed

2
sys/src/lib9p/ramfs.c Normal file → Executable file
View file

@ -53,7 +53,7 @@ fswrite(Req *r)
count = r->ifcall.count;
if(offset+count >= rf->ndata){
v = erealloc9p(rf->data, offset+count);
v = realloc(rf->data, offset+count);
if(v == nil){
respond(r, Enomem);
return;