Skip to content

Commit 8ec8816

Browse files
nashifcarlescufi
authored andcommitted
i2c: shell: add braces around if statement
Add braces around if statements per coding guideline. Signed-off-by: Anas Nashif <[email protected]>
1 parent 9360150 commit 8ec8816

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/i2c_shell.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ static int cmd_i2c_write(const struct shell *shell, size_t argc, char **argv)
110110
dev_addr = strtol(argv[2], NULL, 16);
111111
reg_addr = strtol(argv[3], NULL, 16);
112112
num_bytes = argc - 4;
113-
if (num_bytes < 0)
113+
if (num_bytes < 0) {
114114
return 0;
115+
}
115116
if (num_bytes > MAX_I2C_BYTES) {
116117
num_bytes = MAX_I2C_BYTES;
117118
}

0 commit comments

Comments
 (0)