summaryrefslogtreecommitdiff
path: root/backend/p5_device.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:25:39 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-15 11:25:39 +0200
commit1edb02101a9306fc711cd422ed507d18165b1691 (patch)
treebd2d48a139bfbe869f4f49359b63097931a45e7b /backend/p5_device.c
parent2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff)
move from support/1.0.27 to feature/1.0.27
Diffstat (limited to 'backend/p5_device.c')
-rw-r--r--backend/p5_device.c24
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;
}