At Thu, 15 Feb 2007 16:40:17 +0200, Constantine Gavrilov wrote: > > +#define DSP_OPEN() \ > +{ \ > + fd = lib_oss_pcm_open(file, oflag); \ > + if (fd >= 0) { \ > + int nfds; \ > + fds[fd] = calloc(sizeof(fd_t), 1); \ > + if (fds[fd] == NULL) { \ > + ops[FD_OSS_DSP].close(fd); \ > + errno = ENOMEM; \ > + return -1; \ > + } \ > + fds[fd]->class = FD_OSS_DSP; \ > + fds[fd]->oflags = oflag; \ > + nfds = lib_oss_pcm_poll_fds(fd); \ > + if (nfds > 0) { \ > + fds[fd]->poll_fds = nfds; \ > + poll_fds_add += nfds; \ > + } \ > + } \ > +} > + > +#define MIXER_OPEN() \ > +{ \ > + fd = lib_oss_mixer_open(file, oflag); \ > + if (fd >= 0) { \ > + fds[fd] = calloc(sizeof(fd_t), 1); \ > + if (fds[fd] == NULL) { \ > + ops[FD_OSS_MIXER].close(fd); \ > + errno = ENOMEM; \ > + return -1; \ > + } \ > + fds[fd]->class = FD_OSS_MIXER; \ > + fds[fd]->oflags = oflag; \ > + } \ > +} These are not necessarily macros unlike DECL_OPEN. Static functions would be much better. Could you fix it? Thanks, Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel