Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 24, 2024
1 parent 4b024d6 commit 0e81fbf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion test/ttsafe.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ main(int argc, char *argv[])
#ifdef H5_HAVE_CONCURRENCY
/* Test library packages' threadsafety */
AddTest("h5fl", tts_h5fl, NULL, NULL, NULL, 0, "Multithreaded H5FL package");
#else /* H5_HAVE_CONCURRENCY */
#else /* H5_HAVE_CONCURRENCY */
/* Test library packages' threadsafety */
AddTest("-h5fl", tts_h5fl, NULL, NULL, NULL, 0, "Multithreaded H5FL package");
#endif /* H5_HAVE_CONCURRENCY */
Expand Down
32 changes: 16 additions & 16 deletions test/ttsafe_h5fl.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,36 +450,36 @@ validate_token(const test_token *token)
v = memcmp(token->val, test_types[token->type_idx].zero, test_types[token->type_idx].elmt_size);
VERIFY(v, 0, "ST_ZERO");
if (0 != v)
return(1);
return (1);
break;

case ST_FILL1:
v = memcmp(token->val, test_types[token->type_idx].fill1, test_types[token->type_idx].elmt_size);
VERIFY(v, 0, "ST_FILL1");
if (0 != v)
return(1);
return (1);
break;

case ST_FILL2:
v = memcmp(token->val, test_types[token->type_idx].fill2, test_types[token->type_idx].elmt_size);
VERIFY(v, 0, "ST_FILL2");
if (0 != v)
return(1);
return (1);
break;

case ST_FILL3:
v = memcmp(token->val, test_types[token->type_idx].fill3, test_types[token->type_idx].elmt_size);
VERIFY(v, 0, "ST_FILL3");
if (0 != v)
return(1);
return (1);
break;

default:
assert(0 && "Invalid state for token");
abort();
}

return(0);
return (0);
}

static unsigned
Expand All @@ -493,7 +493,7 @@ run_h5fl_reg_vector(test_vector *vector)
H5FL_reg_malloc(test_types[vector->op_vector[u].param.type_idx].free_list);
CHECK_PTR(vector->op_vector[u].token->val, "H5FL_reg_malloc");
if (NULL == vector->op_vector[u].token->val)
return(1);
return (1);
vector->op_vector[u].token->type_idx = vector->op_vector[u].param.type_idx;
vector->op_vector[u].token->state = ST_UNINIT;
break;
Expand All @@ -503,15 +503,15 @@ run_h5fl_reg_vector(test_vector *vector)
H5FL_reg_calloc(test_types[vector->op_vector[u].param.type_idx].free_list);
CHECK_PTR(vector->op_vector[u].token->val, "H5FL_reg_calloc");
if (NULL == vector->op_vector[u].token->val)
return(1);
return (1);
vector->op_vector[u].token->type_idx = vector->op_vector[u].param.type_idx;
vector->op_vector[u].token->state = ST_ZERO;
break;

case OP_ZERO:
if (ST_UNINIT != vector->op_vector[u].token->state)
if (0 != validate_token(vector->op_vector[u].token))
return(1);
return (1);
memset(vector->op_vector[u].token->val, 0,
test_types[vector->op_vector[u].token->type_idx].elmt_size);
vector->op_vector[u].token->state = ST_ZERO;
Expand All @@ -520,7 +520,7 @@ run_h5fl_reg_vector(test_vector *vector)
case OP_FILL1:
if (ST_UNINIT != vector->op_vector[u].token->state)
if (0 != validate_token(vector->op_vector[u].token))
return(1);
return (1);
memcpy(vector->op_vector[u].token->val,
test_types[vector->op_vector[u].token->type_idx].fill1,
test_types[vector->op_vector[u].token->type_idx].elmt_size);
Expand All @@ -530,7 +530,7 @@ run_h5fl_reg_vector(test_vector *vector)
case OP_FILL2:
if (ST_UNINIT != vector->op_vector[u].token->state)
if (0 != validate_token(vector->op_vector[u].token))
return(1);
return (1);
memcpy(vector->op_vector[u].token->val,
test_types[vector->op_vector[u].token->type_idx].fill2,
test_types[vector->op_vector[u].token->type_idx].elmt_size);
Expand All @@ -540,7 +540,7 @@ run_h5fl_reg_vector(test_vector *vector)
case OP_FILL3:
if (ST_UNINIT != vector->op_vector[u].token->state)
if (0 != validate_token(vector->op_vector[u].token))
return(1);
return (1);
memcpy(vector->op_vector[u].token->val,
test_types[vector->op_vector[u].token->type_idx].fill3,
test_types[vector->op_vector[u].token->type_idx].elmt_size);
Expand All @@ -550,7 +550,7 @@ run_h5fl_reg_vector(test_vector *vector)
case OP_FREE:
if (ST_UNINIT != vector->op_vector[u].token->state)
if (0 != validate_token(vector->op_vector[u].token))
return(1);
return (1);
H5FL_reg_free(test_types[vector->op_vector[u].token->type_idx].free_list,
vector->op_vector[u].token->val);
vector->op_vector[u].token->val = NULL;
Expand All @@ -562,14 +562,14 @@ run_h5fl_reg_vector(test_vector *vector)
}
}

return(0);
return (0);
}

static H5TS_THREAD_RETURN_TYPE
test_h5fl_reg(void *_vectors)
{
test_vector *vectors = (test_vector *)_vectors;
unsigned errors = 0;
test_vector *vectors = (test_vector *)_vectors;
unsigned errors = 0;
H5TS_THREAD_RETURN_TYPE ret_value = (H5TS_THREAD_RETURN_TYPE)0;

/* Randomly run a number of vectors */
Expand All @@ -596,7 +596,7 @@ static test_vector *h5fl_reg_vectors[NUM_THREADS]; /* 'regular' H5FL test vector
void
tts_h5fl(const void H5_ATTR_UNUSED *params)
{
test_token *tokens[NUM_THREADS]; /* Test tokens */
test_token *tokens[NUM_THREADS]; /* Test tokens */
H5TS_thread_t threads[NUM_THREADS];
herr_t result;

Expand Down

0 comments on commit 0e81fbf

Please sign in to comment.