diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:29:05 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:29:05 +0200 |
commit | 324a8a71bb7d9e4f8bc49b6bc47efaf9fb58282e (patch) | |
tree | bd2d48a139bfbe869f4f49359b63097931a45e7b /backend/p5_device.c | |
parent | 2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff) | |
parent | 1edb02101a9306fc711cd422ed507d18165b1691 (diff) |
Merge branch 'release/experimental/1.0.27-1_experimental1'experimental/1.0.27-1_experimental1
Diffstat (limited to 'backend/p5_device.c')
-rw-r--r-- | backend/p5_device.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/backend/p5_device.c b/backend/p5_device.c index c065ca2..924144e 100644 --- a/backend/p5_device.c +++ b/backend/p5_device.c @@ -214,19 +214,19 @@ read_data (int fd, uint8_t * data, int length) static void index_write_data (int fd, uint8_t index, uint8_t * data, int length) { - int mode, rc; + int mode; unsigned char bval; bval = index; mode = IEEE1284_MODE_EPP | IEEE1284_ADDR; - rc = ioctl (fd, PPSETMODE, &mode); - rc = write (fd, &bval, 1); + ioctl (fd, PPSETMODE, &mode); + write (fd, &bval, 1); mode = IEEE1284_MODE_EPP | IEEE1284_DATA; - rc = ioctl (fd, PPSETMODE, &mode); + ioctl (fd, PPSETMODE, &mode); mode = 0; /* data forward */ - rc = ioctl (fd, PPDATADIR, &mode); - rc = write (fd, data, length); + ioctl (fd, PPDATADIR, &mode); + write (fd, data, length); return; } @@ -469,7 +469,7 @@ setadresses (int fd, uint16_t start, uint16_t end) static int open_pp (const char *devicename) { - int fd, rc, mode = 0; + int fd, mode = 0; char *name; DBG (DBG_proc, "open_pp: start, devicename=%s\n", devicename); @@ -512,8 +512,8 @@ open_pp (const char *devicename) free(name); /* claim device and set it to EPP */ - rc = ioctl (fd, PPCLAIM); - rc = ioctl (fd, PPGETMODES, &mode); + ioctl (fd, PPCLAIM); + ioctl (fd, PPGETMODES, &mode); if (mode & PARPORT_MODE_PCSPP) DBG (DBG_io, "PARPORT_MODE_PCSPP\n"); if (mode & PARPORT_MODE_TRISTATE) @@ -546,12 +546,12 @@ open_pp (const char *devicename) if (mode == -1) { DBG (DBG_error, "open_pp: no EPP mode, giving up ...\n"); - rc = ioctl (fd, PPRELEASE); + ioctl (fd, PPRELEASE); close (fd); return -1; } - rc = ioctl (fd, PPNEGOT, &mode); - rc = ioctl (fd, PPSETMODE, &mode); + ioctl (fd, PPNEGOT, &mode); + ioctl (fd, PPSETMODE, &mode); DBG (DBG_proc, "open_pp: exit\n"); return fd; } |