snapshot: remove unused 'uc_link' context
authorBrian Norris <banorris@uci.edu>
Thu, 14 Jun 2012 22:30:25 +0000 (15:30 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 14 Jun 2012 22:30:25 +0000 (15:30 -0700)
The 'currentContext' variable was never initialized, and so doesn't perform any
useful functionality as a 'uc_link' address. Remove it.

snapshot.cc

index 9a69a4b310141cd8fafd8fde5a2b45691b9c9b02..d8eda7f5a3dd8448f0091af1e420e73bf7fb743f 100644 (file)
@@ -183,11 +183,10 @@ void initSnapShotLibrary(unsigned int numbackingpages,
        getcontext( &savedSnapshotContext );
        if( !alreadySwapped ){
                alreadySwapped = 1;
-               ucontext_t currentContext, swappedContext, newContext;
+               ucontext_t swappedContext, newContext;
                getcontext( &newContext );
                newContext.uc_stack.ss_sp = sTheRecord->mStackBase;
                newContext.uc_stack.ss_size = STACK_SIZE_DEFAULT;
-               newContext.uc_link = &currentContext;
                makecontext( &newContext, entryPoint, 0 );
                swapcontext( &swappedContext, &newContext );
        }