From 3a5b2189ed5c5e064912b037c5a3c717de1e791a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 11 Jun 2014 18:01:20 +0200 Subject: 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. --- sys/src/lib9p/ramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 sys/src/lib9p/ramfs.c diff --git a/sys/src/lib9p/ramfs.c b/sys/src/lib9p/ramfs.c old mode 100644 new mode 100755 index e59b7e0c7..13004a4ec --- a/sys/src/lib9p/ramfs.c +++ b/sys/src/lib9p/ramfs.c @@ -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; -- cgit v1.2.3