Skip to content

Commit

Permalink
fix modbus quirks function definition
Browse files Browse the repository at this point in the history
  • Loading branch information
20162026 authored and stephane committed Dec 3, 2022
1 parent 783e651 commit cef86fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,19 +1857,19 @@ int modbus_get_header_length(modbus_t *ctx)
return ctx->backend->header_length;
}

int modbus_enable_quirks(modbus_t *ctx, uint32_t quirks_mask)
int modbus_enable_quirks(modbus_t *ctx, unsigned int quirks_mask)
{
if (ctx == NULL) {
errno = EINVAL;
return -1;
}

/* Enable quirks that have a true value at their index in the mask */
/* Enable quirks that have a true value at their index in the mask */
ctx->quirks |= quirks_mask;
return 0;
}

int modbus_disable_quirks(modbus_t *ctx, uint32_t quirks_mask)
int modbus_disable_quirks(modbus_t *ctx, unsigned int quirks_mask)
{
if (ctx == NULL) {
errno = EINVAL;
Expand Down

0 comments on commit cef86fc

Please sign in to comment.