Remove trailing whitespaces
Change-Id: I6f83333a6ee0fbc562a12bb9555c43a44c98768e
diff --git a/fastboot/bootimg.c b/fastboot/bootimg.c
index e5aea4e..9e0e45c 100644
--- a/fastboot/bootimg.c
+++ b/fastboot/bootimg.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -48,23 +48,23 @@
unsigned second_actual;
unsigned page_mask;
boot_img_hdr *hdr;
-
+
page_mask = page_size - 1;
-
+
kernel_actual = (kernel_size + page_mask) & (~page_mask);
ramdisk_actual = (ramdisk_size + page_mask) & (~page_mask);
second_actual = (second_size + page_mask) & (~page_mask);
-
+
*bootimg_size = page_size + kernel_actual + ramdisk_actual + second_actual;
-
+
hdr = calloc(*bootimg_size, 1);
-
+
if(hdr == 0) {
return hdr;
}
memcpy(hdr->magic, BOOT_MAGIC, BOOT_MAGIC_SIZE);
-
+
hdr->kernel_size = kernel_size;
hdr->ramdisk_size = ramdisk_size;
hdr->second_size = second_size;
@@ -74,9 +74,9 @@
hdr->tags_addr = base + 0x00000100;
hdr->page_size = page_size;
- memcpy(hdr->magic + page_size,
+ memcpy(hdr->magic + page_size,
kernel, kernel_size);
- memcpy(hdr->magic + page_size + kernel_actual,
+ memcpy(hdr->magic + page_size + kernel_actual,
ramdisk, ramdisk_size);
memcpy(hdr->magic + page_size + kernel_actual + ramdisk_actual,
second, second_size);
diff --git a/fastboot/engine.c b/fastboot/engine.c
index 0e6594c..93d24bc 100644
--- a/fastboot/engine.c
+++ b/fastboot/engine.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -66,7 +66,7 @@
va_start(ap, fmt);
vsprintf(buf, fmt, ap);
va_end(ap);
-
+
s = strdup(buf);
if (s == 0) die("out of memory");
return s;
@@ -82,7 +82,7 @@
#define CMD_SIZE 64
-struct Action
+struct Action
{
unsigned op;
Action *next;
diff --git a/fastboot/fastboot.h b/fastboot/fastboot.h
index c2f97a2..7d56ecb 100644
--- a/fastboot/fastboot.h
+++ b/fastboot/fastboot.h
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
diff --git a/fastboot/protocol.c b/fastboot/protocol.c
index 3948363..e871113 100644
--- a/fastboot/protocol.c
+++ b/fastboot/protocol.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -40,7 +40,7 @@
return ERROR;
}
-static int check_response(usb_handle *usb, unsigned size,
+static int check_response(usb_handle *usb, unsigned size,
unsigned data_okay, char *response)
{
unsigned char status[65];
@@ -106,7 +106,7 @@
{
int cmdsize = strlen(cmd);
int r;
-
+
if(response) {
response[0] = 0;
}
@@ -145,7 +145,7 @@
return -1;
}
}
-
+
r = check_response(usb, 0, 0, 0);
if(r < 0) {
return -1;
@@ -168,10 +168,10 @@
{
char cmd[64];
int r;
-
+
sprintf(cmd, "download:%08x", size);
r = _command_send(usb, cmd, data, size, 0);
-
+
if(r < 0) {
return -1;
} else {
diff --git a/fastboot/usb.h b/fastboot/usb.h
index cc157d5..df9efde 100644
--- a/fastboot/usb.h
+++ b/fastboot/usb.h
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -42,19 +42,19 @@
unsigned char dev_class;
unsigned char dev_subclass;
unsigned char dev_protocol;
-
+
unsigned char ifc_class;
unsigned char ifc_subclass;
unsigned char ifc_protocol;
unsigned char has_bulk_in;
unsigned char has_bulk_out;
-
+
unsigned char writable;
char serial_number[256];
};
-
+
typedef int (*ifc_match_func)(usb_ifc_info *ifc);
usb_handle *usb_open(ifc_match_func callback);
diff --git a/fastboot/usb_linux.c b/fastboot/usb_linux.c
index cbc64e4..85187de 100644
--- a/fastboot/usb_linux.c
+++ b/fastboot/usb_linux.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -66,7 +66,7 @@
*/
#define MAX_USBFS_BULK_SIZE (16 * 1024)
-struct usb_handle
+struct usb_handle
{
char fname[64];
int desc;
@@ -85,12 +85,12 @@
static int check(void *_desc, int len, unsigned type, int size)
{
unsigned char *desc = _desc;
-
+
if(len < size) return -1;
if(desc[0] < size) return -1;
if(desc[0] > len) return -1;
if(desc[1] != type) return -1;
-
+
return 0;
}
@@ -103,30 +103,30 @@
struct usb_interface_descriptor *ifc;
struct usb_endpoint_descriptor *ept;
struct usb_ifc_info info;
-
+
int in, out;
unsigned i;
unsigned e;
-
+
if(check(ptr, len, USB_DT_DEVICE, USB_DT_DEVICE_SIZE))
return -1;
dev = (void*) ptr;
len -= dev->bLength;
ptr += dev->bLength;
-
+
if(check(ptr, len, USB_DT_CONFIG, USB_DT_CONFIG_SIZE))
return -1;
cfg = (void*) ptr;
len -= cfg->bLength;
ptr += cfg->bLength;
-
+
info.dev_vendor = dev->idVendor;
info.dev_product = dev->idProduct;
info.dev_class = dev->bDeviceClass;
info.dev_subclass = dev->bDeviceSubClass;
info.dev_protocol = dev->bDeviceProtocol;
info.writable = writable;
-
+
// read device serial number (if there is one)
info.serial_number[0] = 0;
if (dev->iSerialNumber) {
@@ -162,23 +162,23 @@
ifc = (void*) ptr;
len -= ifc->bLength;
ptr += ifc->bLength;
-
+
in = -1;
out = -1;
info.ifc_class = ifc->bInterfaceClass;
info.ifc_subclass = ifc->bInterfaceSubClass;
info.ifc_protocol = ifc->bInterfaceProtocol;
-
+
for(e = 0; e < ifc->bNumEndpoints; e++) {
if(check(ptr, len, USB_DT_ENDPOINT, USB_DT_ENDPOINT_SIZE))
return -1;
ept = (void*) ptr;
len -= ept->bLength;
ptr += ept->bLength;
-
+
if((ept->bmAttributes & 0x03) != 0x02)
continue;
-
+
if(ept->bEndpointAddress & 0x80) {
in = ept->bEndpointAddress;
} else {
@@ -188,7 +188,7 @@
info.has_bulk_in = (in != -1);
info.has_bulk_out = (out != -1);
-
+
if(callback(&info) == 0) {
*ept_in_id = in;
*ept_out_id = out;
@@ -206,25 +206,25 @@
char busname[64], devname[64];
char desc[1024];
int n, in, out, ifc;
-
+
DIR *busdir, *devdir;
struct dirent *de;
int fd;
int writable;
-
+
busdir = opendir(base);
if(busdir == 0) return 0;
while((de = readdir(busdir)) && (usb == 0)) {
if(badname(de->d_name)) continue;
-
+
sprintf(busname, "%s/%s", base, de->d_name);
devdir = opendir(busname);
if(devdir == 0) continue;
-
+
// DBG("[ scanning %s ]\n", busname);
while((de = readdir(devdir)) && (usb == 0)) {
-
+
if(badname(de->d_name)) continue;
sprintf(devname, "%s/%s", busname, de->d_name);
@@ -240,7 +240,7 @@
}
n = read(fd, desc, sizeof(desc));
-
+
if(filter_usb_device(fd, desc, n, writable, callback,
&in, &out, &ifc) == 0) {
usb = calloc(1, sizeof(usb_handle));
@@ -277,13 +277,13 @@
if(h->ep_out == 0) {
return -1;
}
-
+
if(len == 0) {
bulk.ep = h->ep_out;
bulk.len = 0;
bulk.data = data;
bulk.timeout = 0;
-
+
n = ioctl(h->desc, USBDEVFS_BULK, &bulk);
if(n != 0) {
fprintf(stderr,"ERROR: n = %d, errno = %d (%s)\n",
@@ -292,16 +292,16 @@
}
return 0;
}
-
+
while(len > 0) {
int xfer;
xfer = (len > MAX_USBFS_BULK_SIZE) ? MAX_USBFS_BULK_SIZE : len;
-
+
bulk.ep = h->ep_out;
bulk.len = xfer;
bulk.data = data;
bulk.timeout = 0;
-
+
n = ioctl(h->desc, USBDEVFS_BULK, &bulk);
if(n != xfer) {
DBG("ERROR: n = %d, errno = %d (%s)\n",
@@ -327,10 +327,10 @@
if(h->ep_in == 0) {
return -1;
}
-
+
while(len > 0) {
int xfer = (len > MAX_USBFS_BULK_SIZE) ? MAX_USBFS_BULK_SIZE : len;
-
+
bulk.ep = h->ep_in;
bulk.len = xfer;
bulk.data = data;
@@ -353,12 +353,12 @@
count += n;
len -= n;
data += n;
-
+
if(n < xfer) {
break;
}
}
-
+
return count;
}
@@ -377,7 +377,7 @@
int usb_close(usb_handle *h)
{
int fd;
-
+
fd = h->desc;
h->desc = -1;
if(fd >= 0) {
diff --git a/fastboot/usb_osx.c b/fastboot/usb_osx.c
index 6df5d2c..cbce9bd 100644
--- a/fastboot/usb_osx.c
+++ b/fastboot/usb_osx.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -55,7 +55,7 @@
int success;
ifc_match_func callback;
usb_ifc_info info;
-
+
UInt8 bulkIn;
UInt8 bulkOut;
IOUSBInterfaceInterface190 **interface;
@@ -132,7 +132,7 @@
// continue so we can try the next interface
continue;
}
-
+
/*
* Now open the interface. This will cause the pipes
* associated with the endpoints in the interface descriptor
@@ -149,7 +149,7 @@
* use the interface. Maybe something needs to be done about
* this situation.
*/
-
+
kr = (*interface)->USBInterfaceOpen(interface);
if (kr != 0) {
@@ -158,7 +158,7 @@
// continue so we can try the next interface
continue;
}
-
+
// Get the number of endpoints associated with this interface.
kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints);
@@ -242,10 +242,10 @@
ERR("could not clear output pipe; result %x, ignoring....\n", kr);
}
}
-
+
return 0;
}
-
+
next_interface:
(*interface)->USBInterfaceClose(interface);
(*interface)->Release(interface);
@@ -284,7 +284,7 @@
goto error;
}
- /*
+ /*
* We don't need the intermediate interface after the device interface
* is created.
*/
@@ -339,7 +339,7 @@
if (kr == kIOReturnSuccess && req.wLenDone > 0) {
int i, count;
-
+
// skip first word, and copy the rest to the serial string, changing shorts to bytes.
count = (req.wLenDone - 1) / 2;
for (i = 0; i < count; i++)
@@ -364,8 +364,8 @@
if (dev != NULL) {
(*dev)->Release(dev);
}
-
- return -1;
+
+ return -1;
}
@@ -399,7 +399,7 @@
ERR("Could not create iterator.");
return -1;
}
-
+
for (;;) {
if (! IOIteratorIsValid(iterator)) {
/*
@@ -409,7 +409,7 @@
IOIteratorReset(iterator);
continue;
}
-
+
io_service_t device = IOIteratorNext(iterator);
if (device == 0) {
diff --git a/fastboot/usb_windows.c b/fastboot/usb_windows.c
index 1050293..99027cc 100644
--- a/fastboot/usb_windows.c
+++ b/fastboot/usb_windows.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -51,13 +51,13 @@
struct usb_handle {
/// Handle to USB interface
ADBAPIHANDLE adb_interface;
-
+
/// Handle to USB read pipe (endpoint)
ADBAPIHANDLE adb_read_pipe;
-
+
/// Handle to USB write pipe (endpoint)
ADBAPIHANDLE adb_write_pipe;
-
+
/// Interface name
char* interface_name;
};
@@ -303,7 +303,7 @@
info.ifc_subclass = interf_desc.bInterfaceSubClass;
info.ifc_protocol = interf_desc.bInterfaceProtocol;
info.writable = 1;
-
+
// read serial number (if there is one)
unsigned long serial_number_len = sizeof(info.serial_number);
if (!AdbGetSerialNumber(handle->adb_interface, info.serial_number,
diff --git a/fastboot/usbtest.c b/fastboot/usbtest.c
index e34d7e6..b8fb9e2 100644
--- a/fastboot/usbtest.c
+++ b/fastboot/usbtest.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -38,11 +38,11 @@
static unsigned arg_size = 4096;
static unsigned arg_count = 4096;
-long long NOW(void)
+long long NOW(void)
{
struct timeval tv;
gettimeofday(&tv, 0);
-
+
return (((long long) tv.tv_sec) * ((long long) 1000000)) +
(((long long) tv.tv_usec));
}
@@ -110,7 +110,7 @@
int i;
unsigned char buf[4096];
long long t0, t1;
-
+
t0 = NOW();
for(i = 0; i < arg_count; i++) {
if(usb_read(usb, buf, arg_size) != arg_size) {
@@ -123,7 +123,7 @@
return 0;
}
-struct
+struct
{
const char *cmd;
ifc_match_func match;
@@ -179,12 +179,12 @@
{
usb_handle *usb;
int i;
-
+
if(argc < 2)
return usage();
if(argc > 2) {
- if(process_args(argc - 2, argv + 2))
+ if(process_args(argc - 2, argv + 2))
return -1;
}
diff --git a/fastboot/util_linux.c b/fastboot/util_linux.c
index 912e16f..91c3776 100644
--- a/fastboot/util_linux.c
+++ b/fastboot/util_linux.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -38,7 +38,7 @@
{
char proc[64];
char *x;
-
+
sprintf(proc, "/proc/%d/exe", getpid());
int err = readlink(proc, path, PATH_MAX - 1);
diff --git a/fastboot/util_osx.c b/fastboot/util_osx.c
index b43e316..26b832a 100644
--- a/fastboot/util_osx.c
+++ b/fastboot/util_osx.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
diff --git a/fastboot/util_windows.c b/fastboot/util_windows.c
index 37077a4..c3d545c 100644
--- a/fastboot/util_windows.c
+++ b/fastboot/util_windows.c
@@ -9,7 +9,7 @@
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
+ * the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@@ -19,7 +19,7 @@
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF