shithub: riscv

Download patch

ref: 3a5b2189ed5c5e064912b037c5a3c717de1e791a
parent: b4c3726381a5d7f089480bd777f0a096bf82bbee
author: cinap_lenrek <[email protected]>
date: Wed Jun 11 14:01:20 EDT 2014

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.

--- a/sys/src/lib9p/ramfs.c
+++ b/sys/src/lib9p/ramfs.c
@@ -53,7 +53,7 @@
 	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;