From: anton Date: Thu, 11 Feb 2021 11:03:57 +0000 (+0000) Subject: Initialize the stack local device id variable correctly. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e4a088d71ab408c50e07291c68b4cf7690f9f7b1;p=openbsd Initialize the stack local device id variable correctly. CID 1501705 --- diff --git a/sys/dev/usb/uhidpp.c b/sys/dev/usb/uhidpp.c index 5d4af1cb9cd..ca1c7000149 100644 --- a/sys/dev/usb/uhidpp.c +++ b/sys/dev/usb/uhidpp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidpp.c,v 1.6 2021/02/11 07:26:03 anton Exp $ */ +/* $OpenBSD: uhidpp.c,v 1.7 2021/02/11 11:03:57 anton Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist @@ -360,7 +360,7 @@ uhidpp_attach(struct device *parent, struct device *self, void *aux) uint8_t serial[4]; struct uhidpp_device *dev = &sc->sc_devices[i]; const char *type; - uint8_t device_id = device_id + 1; + uint8_t device_id = i + 1; dev->d_id = device_id;