Address code analysis issues
[ric-plt/lib/rmr.git] / test / wormhole_static_test.c
index f2d4bf6..7cabffa 100644 (file)
 #include <errno.h>
 #include <string.h>
 #include <stdint.h>
+#include <pthread.h>
+#include <semaphore.h>
 
-#include "../src/common/include/rmr.h"
-#include "../src/common/include/rmr_agnostic.h"
+#include "rmr.h"
+#include "rmr_agnostic.h"
 
 
 /*
@@ -54,13 +56,9 @@ static int worm_test( ) {
        int             whid = -1;
        int             last_whid;
 
-       ctx = (uta_ctx_t *) malloc( sizeof( uta_ctx_t ) );
-       if( ctx == NULL ) {
-               fail_if_nil( ctx, "could not allocate dummy context" );
-               return 1;
-       }
-       memset( ctx, 0, sizeof( *ctx ) );
+       ctx = mk_dummy_ctx();
        ctx->my_name = strdup( "tester" );
+       ctx->my_ip = strdup( "30.4.19.86:1111" );
 
        gen_rt( ctx );