~ubuntu-branches/ubuntu/saucy/libusbx/saucy-proposed

« back to all changes in this revision

Viewing changes to examples/dpfp.c

  • Committer: Package Import Robot
  • Author(s): Aurelien Jarno
  • Date: 2013-05-06 17:31:43 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130506173143-wfbiltvcnn7pvdpa
Tags: 2:1.0.15-1
* New upstream version.
* Fix cross-build (closes: #694912, #705658).
* Add a -dbg package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <stdio.h>
28
28
#include <stdlib.h>
29
29
 
30
 
#include <libusb.h>
 
30
#include "libusb.h"
31
31
 
32
32
#define EP_INTR                 (1 | LIBUSB_ENDPOINT_IN)
33
33
#define EP_DATA                 (2 | LIBUSB_ENDPOINT_IN)
164
164
 
165
165
static int set_mode_async(unsigned char data)
166
166
{
167
 
        unsigned char *buf = malloc(LIBUSB_CONTROL_SETUP_SIZE + 1);
 
167
        unsigned char *buf = (unsigned char*) malloc(LIBUSB_CONTROL_SETUP_SIZE + 1);
168
168
        struct libusb_transfer *transfer;
169
169
 
170
170
        if (!buf)