X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fwormhole_static_test.c;h=7cabffa214400fbd1b7add99952a141365f8eba0;hb=refs%2Ftags%2F3.3.0;hp=47bd85f5dc0f241f64d189a529f89cce57b16560;hpb=6b1712a0f1c2fb37eec04b3114ce1956800f74c9;p=ric-plt%2Flib%2Frmr.git diff --git a/test/wormhole_static_test.c b/test/wormhole_static_test.c index 47bd85f..7cabffa 100644 --- a/test/wormhole_static_test.c +++ b/test/wormhole_static_test.c @@ -56,12 +56,7 @@ 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" );