Got rid of obsolete error codes.
This commit is contained in:
parent
3464515b7d
commit
792e4b741f
2 changed files with 3 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue