The following reply was made to PR usb/146367; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/146367: commit references a PR
Date: Thu, 13 May 2010 02:03:14 +0000 (UTC)

 Author: thompsa
 Date: Thu May 13 02:03:00 2010
 New Revision: 208023
 URL: http://svn.freebsd.org/changeset/base/208023
 
 Log:
   Use fixed width integer types for parsing the binary hid data.
   
   PR:          usb/146367
   Submitted by:        Hans Petter Selasky
 
 Modified:
   head/lib/libusbhid/data.c
   head/lib/libusbhid/usbhid.h
 
 Modified: head/lib/libusbhid/data.c
 ==============================================================================
 --- head/lib/libusbhid/data.c  Thu May 13 01:50:29 2010        (r208022)
 +++ head/lib/libusbhid/data.c  Thu May 13 02:03:00 2010        (r208023)
 @@ -34,7 +34,7 @@ __FBSDID("$FreeBSD$");
  #include <stdlib.h>
  #include "usbhid.h"
  
 -int
 +int32_t
  hid_get_data(const void *p, const hid_item_t *h)
  {
        const uint8_t *buf;
 @@ -78,12 +78,15 @@ hid_get_data(const void *p, const hid_it
  }
  
  void
 -hid_set_data(void *p, const hid_item_t *h, int data)
 +hid_set_data(void *p, const hid_item_t *h, int32_t data)
  {
        uint8_t *buf;
        uint32_t hpos;
        uint32_t hsize;
 -      int i, end, offs, mask;
 +      uint32_t mask;
 +      int i;
 +      int end;
 +      int offs;
  
        buf = p;
  
 
 Modified: head/lib/libusbhid/usbhid.h
 ==============================================================================
 --- head/lib/libusbhid/usbhid.h        Thu May 13 01:50:29 2010        
(r208022)
 +++ head/lib/libusbhid/usbhid.h        Thu May 13 02:03:00 2010        
(r208023)
 @@ -29,7 +29,7 @@
   *
   */
  
 -#include <sys/types.h>
 +#include <stdint.h>
  
  typedef struct report_desc *report_desc_t;
  
 @@ -102,7 +102,7 @@ int hid_parse_usage_in_page(const char *
  int hid_parse_usage_page(const char *name);
  
  /* Extracting/insertion of data, data.c: */
 -int hid_get_data(const void *p, const hid_item_t *h);
 -void hid_set_data(void *p, const hid_item_t *h, int data);
 +int32_t hid_get_data(const void *p, const hid_item_t *h);
 +void hid_set_data(void *p, const hid_item_t *h, int32_t data);
  
  __END_DECLS
 _______________________________________________
 svn-src-...@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
 
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to