From: bdemsky Date: Sun, 12 Nov 2006 22:47:29 +0000 (+0000) Subject: change number of failures to mean the number actually injected as opposed to the... X-Git-Tag: preEdgeChange~747 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=08f58ab276dc92d5e875483f7ec1337a95addc0f;p=IRC.git change number of failures to mean the number actually injected as opposed to the number of time the injection routine was called --- diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c index 0a804eba..cf45bfd5 100644 --- a/Robust/src/Runtime/runtime.c +++ b/Robust/src/Runtime/runtime.c @@ -466,11 +466,11 @@ void injectinstructionfailure() { if (injectinstructionfailures) { if (numfailures==0) return; - if (numfailures>0) - numfailures--; instructioncount=failurecount; instaccum+=failurecount; if ((((double)random())/RAND_MAX)0) + numfailures--; printf("FAILURE!!!\n"); longjmp(error_handler,11); }