Skip to content

Commit 384e694

Browse files
nobumatzbot
authored andcommitted
[ruby/date] Enclose dangling else in braces and fix -Wmisleading-indentation
``` date_strptime.c:253:324: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] 253 | ...((VALUE)RUBY_Qtrue)); return 0; } while (0); si += l; } while (0); | ^ date_strptime.c:252:7: note: previous statement is here 252 | else | ^ ``` ruby/date@41aed5b746
1 parent 691c895 commit 384e694

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/date/date_strptime.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ do { \
122122
do { \
123123
size_t l; \
124124
l = read_digits(&str[si], slen - si, &n, w); \
125-
if (l == 0) \
125+
if (l == 0) { \
126126
fail(); \
127+
} \
127128
si += l; \
128129
} while (0)
129130

0 commit comments

Comments
 (0)