diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-09-28 12:20:37 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-09-28 12:20:37 +0000 |
commit | 21e83d18f6d35f9060d1cb0239a93b85860f0ffe (patch) | |
tree | d177d3d262a9743d10b68d1a2f7c405e20e9b665 | |
parent | 3020b7c9c628f5f450b7e6caa95cfa5210891c88 (diff) |
cleaned up a bit
svn path=/trunk/externals/zexy/; revision=3642
-rw-r--r-- | src/lpt.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 */ |