Skip to content

Commit ab52b49

Browse files
committed
Use pointer null compare instead of integer compare.
1 parent df7a294 commit ab52b49

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hal/drivers/hal_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ int build_chips_collection(char *name, hal_gpio_bulk_t **ptr, int *count){
165165
struct gpiod_line *temp_line;
166166

167167
temp_line = gpiod_line_find(name);
168-
if (temp_line <= 0) {
168+
if (!temp_line) {
169169
rtapi_print_msg(RTAPI_MSG_ERR, "The GPIO line %s can not be found\n", name);
170170
return -EINVAL;
171171
}

0 commit comments

Comments
 (0)