mirror of
https://github.com/shakemid/pcsensor-temper.git
synced 2025-01-21 09:08:17 +01:00
Use memset() instead of bzero()
- The function bzero() is deprecated (marked as LEGACY in POSIX.1-2001) use memset() in new programs. POSIX.1-2008 removes the specification of bzero(). From: https://linux.die.net/man/3/bzero - Furthermore, this fixes the compiler warning using MinGW-w64: pcsensor.c:272:5: warning: implicit declaration of function 'bzero' [-Wimplicit-function-declaration] bzero(answer, reqIntLen);
This commit is contained in:
parent
7c335932cf
commit
a4f496129c
1 changed files with 1 additions and 1 deletions
|
@ -269,7 +269,7 @@ void control_transfer(libusb_device_handle *dev, const char *pquestion) {
|
|||
|
||||
void interrupt_read(libusb_device_handle *dev, unsigned char *answer) {
|
||||
int r,s,i;
|
||||
bzero(answer, reqIntLen);
|
||||
memset(answer, 0, reqIntLen);
|
||||
|
||||
s = libusb_interrupt_transfer(dev, endpoint_Int_in, answer, reqIntLen, &r, timeout);
|
||||
if(r != reqIntLen) {
|
||||
|
|
Loading…
Add table
Reference in a new issue