From 21e83d18f6d35f9060d1cb0239a93b85860f0ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 28 Sep 2005 12:20:37 +0000 Subject: cleaned up a bit svn path=/trunk/externals/zexy/; revision=3642 --- src/lpt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lpt.c') 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 */ -- cgit v1.2.1