Skip to content

Commit 4c31e87

Browse files
authored
Merge pull request #3410 from BsAtHome/backport_2.9_fix-pointer-compare
Backport: Use pointer null compare instead of integer compare
2 parents df7a294 + ab52b49 commit 4c31e87

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)