aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-09-28 12:20:37 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-09-28 12:20:37 +0000
commit21e83d18f6d35f9060d1cb0239a93b85860f0ffe (patch)
treed177d3d262a9743d10b68d1a2f7c405e20e9b665 /src
parent3020b7c9c628f5f450b7e6caa95cfa5210891c88 (diff)
cleaned up a bit
svn path=/trunk/externals/zexy/; revision=3642
Diffstat (limited to 'src')
-rw-r--r--src/lpt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lpt.c b/src/lpt.c
index 44e63ad..2522673 100644
--- a/src/lpt.c
+++ b/src/lpt.c
@@ -190,17 +190,16 @@ static void *lpt_new(t_symbol *s, int argc, t_atom *argv)
x->device=-1;
x->port=strtol(devname, 0, 16);
if(0==x->port){
- x->port=-1;
#ifdef HAVE_PPDEV
x->device = open(devname, O_RDWR);
- if(x->device<0){
+ if(x->device<=0){
error("lpt: bad device %s", devname);
return(x);
} else {
if (ioctl (x->device, PPCLAIM)) {
perror ("PPCLAIM");
close (x->device);
- return(x);
+ x->device=-1;
}
}
#endif /* HAVE_PPDEV */