diff options
author | Bartosz Golaszewski <bartekgola@gmail.com> | 2018-02-03 16:06:47 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartekgola@gmail.com> | 2018-02-03 16:06:47 +0100 |
commit | 610a8111bc78ce7c7de76f20fc1b9269155134a6 (patch) | |
tree | 742a0f5b257be8c29545126a4b72f663513d9db9 | |
parent | 7b493a5019d1a9f7a7b4ce2e87700ed432969f66 (diff) | |
download | libgpiod-610a8111bc78ce7c7de76f20fc1b9269155134a6.tar.gz |
core: constify *values in gpiod_line_set_value_bulk()
The values in the array passed as argument to this routine are never
modified.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
-rw-r--r-- | include/gpiod.h | 2 | ||||
-rw-r--r-- | src/lib/core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/gpiod.h b/include/gpiod.h index ede5615f..d37e60c1 100644 --- a/include/gpiod.h +++ b/include/gpiod.h @@ -1006,7 +1006,7 @@ int gpiod_line_set_value(struct gpiod_line *line, int value) GPIOD_API; * undefined. */ int gpiod_line_set_value_bulk(struct gpiod_line_bulk *bulk, - int *values) GPIOD_API; + const int *values) GPIOD_API; /** * @} diff --git a/src/lib/core.c b/src/lib/core.c index d540890b..f8431a40 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -581,7 +581,7 @@ int gpiod_line_set_value(struct gpiod_line *line, int value) return gpiod_line_set_value_bulk(&bulk, &value); } -int gpiod_line_set_value_bulk(struct gpiod_line_bulk *bulk, int *values) +int gpiod_line_set_value_bulk(struct gpiod_line_bulk *bulk, const int *values) { struct gpiohandle_data data; struct gpiod_line *line; |