From: Bartosz Golaszewski Date: Wed, 4 Jan 2017 16:54:15 +0000 (+0100) Subject: core: remove redundant memset() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d4092dcb07a5c411419d3e78805b081a8ead68e2;p=qemu-gpiodev%2Flibgpiod.git core: remove redundant memset() The request structure is already zeroed by zalloc(). Signed-off-by: Bartosz Golaszewski --- diff --git a/core.c b/core.c index 905f36c..1994fdd 100644 --- a/core.c +++ b/core.c @@ -251,8 +251,6 @@ int gpiod_line_request_bulk(struct gpiod_line_bulk *line_bulk, if (!req) return -1; - memset(req, 0, sizeof(*req)); - if (config->flags & GPIOD_REQUEST_OPEN_DRAIN) req->flags |= GPIOHANDLE_REQUEST_OPEN_DRAIN; if (config->flags & GPIOD_REQUEST_OPEN_SOURCE)