Trailing whitespace fixes.

This commit is contained in:
Solomon Peachy 2017-11-25 10:45:51 -05:00
parent e42e8730b7
commit ff9f34572e
3 changed files with 12 additions and 12 deletions

View File

@ -597,10 +597,10 @@ abort_release:
abort_close: abort_close:
libusb_close(dev); libusb_close(dev);
abort: abort:
if (config) libusb_free_config_descriptor(config); if (config) libusb_free_config_descriptor(config);
/* Clean up the dictionary */ /* Clean up the dictionary */
while (dlen--) { while (dlen--) {
free (dict[dlen].key); free (dict[dlen].key);

View File

@ -167,7 +167,7 @@ static uint8_t * magicard_parse_resp(uint8_t *buf, uint16_t len, uint16_t *respl
struct magicard_resp_header *hdr = (struct magicard_resp_header *) buf; struct magicard_resp_header *hdr = (struct magicard_resp_header *) buf;
*resplen = len - sizeof(hdr->guard) - sizeof(hdr->subcmd_arg) - 2; *resplen = len - sizeof(hdr->guard) - sizeof(hdr->subcmd_arg) - 2;
return hdr->data; return hdr->data;
} }
@ -244,7 +244,7 @@ static int magicard_query_status(struct magicard_ctx *ctx)
int ret = 0; int ret = 0;
int i; int i;
uint8_t buf[256]; uint8_t buf[256];
for (i = 0 ; ; i++) { for (i = 0 ; ; i++) {
uint16_t resplen = 0; uint16_t resplen = 0;
uint8_t *resp; uint8_t *resp;
@ -261,16 +261,16 @@ static int magicard_query_status(struct magicard_ctx *ctx)
return ret; return ret;
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));
ret = read_data(ctx->dev, ctx->endp_up, ret = read_data(ctx->dev, ctx->endp_up,
buf, sizeof(buf), &num); buf, sizeof(buf), &num);
if (ret < 0) if (ret < 0)
return ret; return ret;
resp = magicard_parse_resp(buf, num, &resplen); resp = magicard_parse_resp(buf, num, &resplen);
resp[resplen] = 0; resp[resplen] = 0;
switch(magicard_sta_requests[i].type) { switch(magicard_sta_requests[i].type) {
case TYPE_IPADDR: { case TYPE_IPADDR: {
int32_t ipaddr; int32_t ipaddr;
uint8_t *addr = (uint8_t *) &ipaddr; uint8_t *addr = (uint8_t *) &ipaddr;
@ -311,7 +311,7 @@ static int magicard_query_status(struct magicard_ctx *ctx)
resp); resp);
} }
} }
return ret; return ret;
} }
@ -431,7 +431,7 @@ static int magicard_read_parse(void *vctx, int data_fd) {
uint8_t *in_y, *in_m, *in_c; uint8_t *in_y, *in_m, *in_c;
uint8_t *out_y, *out_m, *out_c, *out_k; uint8_t *out_y, *out_m, *out_c, *out_k;
uint32_t len_y = 0, len_m = 0, len_c = 0, len_k = 0; uint32_t len_y = 0, len_m = 0, len_c = 0, len_k = 0;
if (!ctx) if (!ctx)
return CUPS_BACKEND_FAILED; return CUPS_BACKEND_FAILED;
@ -562,7 +562,7 @@ static int magicard_read_parse(void *vctx, int data_fd) {
ctx->datalen += sprintf((char*)ctx->databuf + ctx->datalen, ",SZK%u", len_k); ctx->datalen += sprintf((char*)ctx->databuf + ctx->datalen, ",SZK%u", len_k);
} }
} }
/* Terminate command stream */ /* Terminate command stream */
ctx->databuf[ctx->datalen++] = 0x1c; ctx->databuf[ctx->datalen++] = 0x1c;
@ -773,7 +773,7 @@ struct dyesub_backend magicard_backend = {
* Each plane terminates with 0x1c __ 0x3a, where __ is 0x42, 0x47, 0x52, * Each plane terminates with 0x1c __ 0x3a, where __ is 0x42, 0x47, 0x52,
and 0x4b for B/G/R/K respectively. Terminator is _not_ part of length. and 0x4b for B/G/R/K respectively. Terminator is _not_ part of length.
* Image data is 6bpp for B/G/R and 1bpp for K, 672*1016 pixels * Image data is 6bpp for B/G/R and 1bpp for K, 672*1016 pixels
* Organized in a series of 84-byte rows. * Organized in a series of 84-byte rows.
* Byte data is LSB first. * Byte data is LSB first.
* Each row is a single stripe of a single bit of a pixel, so * Each row is a single stripe of a single bit of a pixel, so
color data is b0b0b0b0.. b1b1b1b1.. .. b5b5b5b5. color data is b0b0b0b0.. b1b1b1b1.. .. b5b5b5b5.

View File

@ -1911,7 +1911,7 @@ struct dyesub_backend shinkos6245_backend = {
.query_serno = shinkos6245_query_serno, .query_serno = shinkos6245_query_serno,
.devices = { .devices = {
{ USB_VID_SHINKO, USB_PID_SHINKO_S6245, P_SHINKO_S6245, NULL}, { USB_VID_SHINKO, USB_PID_SHINKO_S6245, P_SHINKO_S6245, NULL},
{ USB_VID_HITI, USB_PID_HITI_P910L, P_SHINKO_S6245, NULL}, { USB_VID_HITI, USB_PID_HITI_P910L, P_SHINKO_S6245, NULL},
{ 0, 0, 0, NULL} { 0, 0, 0, NULL}
} }
}; };