Skip to content

Commit eeb6dd9

Browse files
committed
auto format
1 parent 66383d5 commit eeb6dd9

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

lib/core/jtrace.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ j_trace_thread_new(GThread* thread)
251251
}
252252
#endif
253253

254-
if(j_trace_flags & J_TRACE_ACCESS)
254+
if (j_trace_flags & J_TRACE_ACCESS)
255255
{
256256
trace_thread->access.db.namespace = g_string_new(NULL);
257257
trace_thread->access.kv.namespace = g_string_new(NULL);
@@ -650,20 +650,26 @@ parse_backend_operation(const gchar* backend_operation, JBackendType* type, cons
650650
{
651651
if (strncmp(backend_operation, "kv_", 3) == 0)
652652
{
653-
if(type) *type = J_BACKEND_TYPE_KV;
654-
if(operation) *operation = backend_operation + 3;
653+
if (type)
654+
*type = J_BACKEND_TYPE_KV;
655+
if (operation)
656+
*operation = backend_operation + 3;
655657
return TRUE;
656658
}
657659
else if (strncmp(backend_operation, "db_", 3) == 0)
658660
{
659-
if(type) *type = J_BACKEND_TYPE_DB;
660-
if(operation) *operation = backend_operation + 3;
661+
if (type)
662+
*type = J_BACKEND_TYPE_DB;
663+
if (operation)
664+
*operation = backend_operation + 3;
661665
return TRUE;
662666
}
663667
else if (strncmp(backend_operation, "object_", 7) == 0)
664668
{
665-
if(type) *type = J_BACKEND_TYPE_OBJECT;
666-
if(operation) *operation = backend_operation + 7;
669+
if (type)
670+
*type = J_BACKEND_TYPE_OBJECT;
671+
if (operation)
672+
*operation = backend_operation + 7;
667673
return TRUE;
668674
}
669675
return FALSE;

tools/access_replay.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,21 +106,24 @@ split(char* line, char* parts[ROW_LEN])
106106
while (section != NULL)
107107
{
108108
parts[cnt++] = section;
109-
if (cnt == ROW_LEN-1)
109+
if (cnt == ROW_LEN - 1)
110110
{
111111
break;
112112
}
113-
while(*save == ',') {
113+
while (*save == ',')
114+
{
114115
*save = '\0';
115116
parts[cnt++] = save++;
116117
}
117118
section = strtok_r(NULL, ",", &save);
118119
}
119-
if(section == NULL) {
120+
if (section == NULL)
121+
{
120122
g_warning("to few parts in line");
121123
return FALSE;
122124
}
123-
while (*++section);
125+
while (*++section)
126+
;
124127
parts[cnt] = section + 1;
125128
parts[JSON] += 1;
126129
{
@@ -579,7 +582,7 @@ main(int argc, char** argv)
579582
// initialize memory_chunk with random values
580583
guint32* memory = malloc(memory_chunck_size + memory_chunck_size % 4);
581584
GRand* rng = g_rand_new();
582-
for(guint64 i = 0; i < (memory_chunck_size + 3)/4; i += 1)
585+
for (guint64 i = 0; i < (memory_chunck_size + 3) / 4; i += 1)
583586
{
584587
memory[i] = g_rand_int(rng);
585588
}

0 commit comments

Comments
 (0)