mirror of
https://github.com/martijnvanbrummelen/nwipe.git
synced 2026-02-20 05:32:14 +00:00
Fixes uninitialized variable warning
This commit is contained in:
@@ -995,7 +995,7 @@ void nwipe_gui_prng( void )
|
||||
if( nwipe_options.prng == &nwipe_isaac ) { focus = 1; }
|
||||
|
||||
|
||||
do
|
||||
while( keystroke != ERR )
|
||||
{
|
||||
/* Clear the main window. */
|
||||
werase( main_window );
|
||||
@@ -1086,7 +1086,6 @@ void nwipe_gui_prng( void )
|
||||
} /* switch */
|
||||
|
||||
} /* while */
|
||||
while( keystroke != ERR )
|
||||
|
||||
} /* nwipe_gui_prng */
|
||||
|
||||
|
||||
@@ -20,10 +20,14 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
#define _POSIX_SOURCE
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <bits/pthreadtypes.h>
|
||||
#include <bits/sigthread.h>
|
||||
|
||||
#include "nwipe.h"
|
||||
#include "context.h"
|
||||
@@ -142,6 +146,7 @@ int main( int argc, char** argv )
|
||||
|
||||
nwipe_thread_data_ptr.c = c2;
|
||||
nwipe_misc_thread_data.nwipe_enumerated = nwipe_enumerated;
|
||||
nwipe_misc_thread_data.nwipe_selected = 0;
|
||||
if( !nwipe_options.nogui )
|
||||
nwipe_misc_thread_data.gui_thread = &nwipe_gui_thread;
|
||||
nwipe_thread_data_ptr.nwipe_misc_thread_data = &nwipe_misc_thread_data;
|
||||
@@ -566,12 +571,14 @@ void *signal_hand(void *ptr)
|
||||
case SIGQUIT :
|
||||
case SIGTERM :
|
||||
{
|
||||
nwipe_log( NWIPE_LOG_INFO, "nwipe_selected = %lu", nwipe_misc_thread_data->nwipe_selected );
|
||||
|
||||
for( i = 0; i < nwipe_misc_thread_data->nwipe_selected; i++ )
|
||||
{
|
||||
|
||||
if ( c[i]->thread )
|
||||
{
|
||||
nwipe_log( NWIPE_LOG_INFO, "Cancelling thread for %s", c[i]->device_name );
|
||||
pthread_cancel( c[i]->thread );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user