sio.c (xinetd-2.3.15) | : | sio.c (xinetd-2.3.15.4.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 352 | skipping to change at line 352 | |||
errno = EINVAL ; | errno = EINVAL ; | |||
return( SIO_ERR ) ; | return( SIO_ERR ) ; | |||
} | } | |||
if( sio_setup( fd, &dp, __SIO_OUTPUT_STREAM ) == SIO_ERR ) | if( sio_setup( fd, &dp, __SIO_OUTPUT_STREAM ) == SIO_ERR ) | |||
return( SIO_ERR ); | return( SIO_ERR ); | |||
ODP( dp )->buftype = type ; | ODP( dp )->buftype = type ; | |||
return( 0 ) ; | return( 0 ) ; | |||
} | } | |||
#ifndef sio_memscan | ||||
static char *sio_memscan( const char *from, size_t how_many, char ch ) | ||||
{ | ||||
char *p ; | ||||
char *last = from + how_many ; | ||||
for ( p = from ; p < last ; p++ ) | ||||
if ( *p == ch ) | ||||
return( p ) ; | ||||
return( 0 ) ; | ||||
} | ||||
#endif /* sio_memscan */ | ||||
#ifdef NEED_MEMCOPY | ||||
void __sio_memcopy( const char *from, char *to, size_t nbytes ) | ||||
{ | ||||
while ( nbytes-- ) | ||||
*to++ = *from++ ; | ||||
} | ||||
#endif /* NEED_MEMCOPY */ | ||||
int sio_setup(int fd, __sio_descriptor_t **dp, unsigned int type) | int sio_setup(int fd, __sio_descriptor_t **dp, unsigned int type) | |||
{ | { | |||
if ( fd >= __sio_n_descriptors ) { | if ( fd >= __sio_n_descriptors ) { | |||
if( Smorefds(fd) != 0 ) { | if( Smorefds(fd) != 0 ) { | |||
errno = EBADF; | errno = EBADF; | |||
return(SIO_ERR); | return(SIO_ERR); | |||
} | } | |||
} | } | |||
*dp = &__sio_descriptors[ fd ]; | *dp = &__sio_descriptors[ fd ]; | |||
End of changes. 1 change blocks. | ||||
25 lines changed or deleted | 0 lines changed or added |