Skip to content

Commit 51ecaf6

Browse files
libsocketcan: add { } to fix compilation with disabled logging
Reported-by: https://github.com/cls22 Fixes: #1
1 parent 077def3 commit 51ecaf6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libsocketcan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res)
437437
continue;
438438

439439
if (acquire == GET_XSTATS) {
440-
if (!linkinfo[IFLA_INFO_XSTATS])
440+
if (!linkinfo[IFLA_INFO_XSTATS]) {
441441
fprintf(stderr, "no can statistics found\n");
442-
else {
442+
} else {
443443
memcpy(res, RTA_DATA(linkinfo[IFLA_INFO_XSTATS]),
444444
sizeof(struct can_device_stats));
445445
ret = 0;

0 commit comments

Comments
 (0)