Got rid of obsolete error codes.

This commit is contained in:
Frank Mori Hess 2007-12-01 15:53:18 +00:00
parent 3464515b7d
commit 792e4b741f
2 changed files with 3 additions and 11 deletions

View file

@ -98,7 +98,7 @@ void internal_error(int err)
int valid_dev(comedi_t *it)
{
if(!it || it->magic!=COMEDILIB_MAGIC){
internal_error(COMEDILIB_BADDEV);
internal_error(EBAD_CT);
return 0;
}
@ -109,7 +109,7 @@ int valid_subd(comedi_t *it,unsigned int subd)
{
if(!valid_dev(it))return 0;
if(subd>=it->n_subdevices){
internal_error(COMEDILIB_BADSUBD);
internal_error(EINVAL_SUBD);
return 0;
}
@ -120,7 +120,7 @@ int valid_chan(comedi_t *it,unsigned int subd,unsigned int chan)
{
if(!valid_subd(it,subd))return 0;
if(chan>=it->subdevices[subd].n_chan){
internal_error(COMEDILIB_BADCHAN);
internal_error(EINVAL_CHAN);
return 0;
}

View file

@ -141,14 +141,6 @@ int valid_dev(comedi_t *it);
int valid_subd(comedi_t *it,unsigned int subdevice);
int valid_chan(comedi_t *it,unsigned int subdevice,unsigned int chan);
enum{
COMEDILIB_NOERROR = 0x1000,
COMEDILIB_UNKNOWN,
COMEDILIB_BADDEV,
COMEDILIB_BADSUBD,
COMEDILIB_BADCHAN,
};
/* used by range.c, was in comedilib.h but apparently deprecated so I put it here - fmhess */
int comedi_get_rangetype(comedi_t *it,unsigned int subdevice,unsigned int chan);