Skip to content

Commit a22f2b3

Browse files
gpu/utils: add braces for the if-else
1 parent e2180e5 commit a22f2b3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

video/out/gpu/utils.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,12 @@ void mp_log_source(struct mp_log *log, int lev, const char *src)
339339
return;
340340
while (*src) {
341341
const char *end = strchr(src, '\n');
342-
const char *next = end + 1;
343-
if (!end)
342+
const char *next;
343+
if (!end) {
344344
next = end = src + strlen(src);
345+
} else {
346+
next = end + 1;
347+
}
345348
mp_msg(log, lev, "[%3d] %.*s\n", line, (int)(end - src), src);
346349
line++;
347350
src = next;

0 commit comments

Comments
 (0)