Skip to content

Commit d56be66

Browse files
committed
change desired clang-format
1 parent fb2664f commit d56be66

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ IndentWidth: 2
33
ColumnLimit: 100
44
UseTab: Never
55
AllowShortIfStatementsOnASingleLine: true
6+
AllowShortLoopsOnASingleLine: true
67
AllowShortFunctionsOnASingleLine: Empty
78
BreakBeforeBraces: Allman
89
SpaceBeforeParens: ControlStatements

src/ctx.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ cj_label cj_create_label(cj_ctx *ctx)
162162

163163
void cj_mark_label(cj_ctx *ctx, cj_label label)
164164
{
165-
if (label.id < 0 || label.id >= ctx->num_labels)
166-
return;
165+
if (label.id < 0 || label.id >= ctx->num_labels) return;
167166

168167
ctx->label_positions[label.id] = ctx->len;
169168

@@ -265,10 +264,10 @@ void cj_emit_x86_rel(cj_ctx *ctx, const uint8_t *opcode, size_t opcode_len, uint
265264
int64_t rel = (int64_t)ctx->label_positions[label.id] - (int64_t)(disp_pos + disp_width);
266265
int64_t min = -(1LL << ((disp_width * 8) - 1));
267266
int64_t max = (1LL << ((disp_width * 8) - 1)) - 1;
268-
if (rel < min || rel > max)
269-
return;
267+
if (rel < min || rel > max) return;
270268

271-
for (uint8_t b = 0; b < disp_width; b++) ctx->mem[disp_pos + b] = (uint8_t)((rel >> (8 * b)) & 0xFF);
269+
for (uint8_t b = 0; b < disp_width; b++)
270+
ctx->mem[disp_pos + b] = (uint8_t)((rel >> (8 * b)) & 0xFF);
272271
}
273272
else
274273
{

0 commit comments

Comments
 (0)