fix trailing spaces in mixer-specific bits

This commit is contained in:
Alexandre Ratchov 2017-05-18 15:27:11 +02:00
parent 756d36a97e
commit 1129bb3390
6 changed files with 16 additions and 17 deletions

View File

@ -67,7 +67,7 @@ siomix_aucat_rdata(struct siomix_aucat_hdl *hdl)
while (hdl->aucat.rstate == RSTATE_DATA) {
/* read entries */
while (hdl->buf_wpos < sizeof(hdl->buf) &&
while (hdl->buf_wpos < sizeof(hdl->buf) &&
hdl->aucat.rstate == RSTATE_DATA) {
n = _aucat_rdata(&hdl->aucat,
(unsigned char *)hdl->buf + hdl->buf_wpos,
@ -216,7 +216,7 @@ siomix_aucat_setctl(struct siomix_hdl *addr, unsigned int a, unsigned int v)
hdl->aucat.wstate = WSTATE_MSG;
hdl->aucat.wtodo = sizeof(struct amsg);
hdl->aucat.wmsg.cmd = htonl(AMSG_MIXSET);
hdl->aucat.wmsg.u.mixset.addr = htons(a);
hdl->aucat.wmsg.u.mixset.addr = htons(a);
hdl->aucat.wmsg.u.mixset.val = htons(v);
return _aucat_wmsg(&hdl->aucat, &hdl->siomix.eof);
}

View File

@ -14,7 +14,7 @@ LDADD = -lsndio @ldadd@
@vars@
#
# binaries, documentation, man pages and examples will be installed in
# binaries, documentation, man pages and examples will be installed in
# ${BIN_DIR}, ${MAN1_DIR}
#
BIN_DIR = @bindir@
@ -45,7 +45,7 @@ clean:
OBJS = sndioctl.o
sndioctl: ${OBJS}
${CC} ${LDFLAGS} ${LIB} -o sndioctl ${OBJS} ${LDADD}
${CC} ${LDFLAGS} ${LIB} -o sndioctl ${OBJS} ${LDADD}
.c.o:
${CC} ${CFLAGS} ${INCLUDE} ${DEFS} -c $<

View File

@ -94,10 +94,10 @@ cmpdesc(struct siomix_desc *d1, struct siomix_desc *d2)
if (d1->type == SIOMIX_VEC ||
d1->type == SIOMIX_LIST) {
if (res != 0)
return res;
return res;
res = strcmp(d1->chan1.str, d2->chan1.str);
if (res != 0)
return res;
return res;
res = d1->chan1.unit - d2->chan1.unit;
}
return res;
@ -129,7 +129,7 @@ selpos(struct info *i)
abort();
}
/*
/*
* find the selector or vector entry with the given name and channels
*/
struct info *
@ -400,7 +400,7 @@ print_par(struct info *p, int mono, char *comment)
print_chan(&p->desc.chan0, mono);
printf(".%s=", p->desc.func);
if (i_flag)
print_desc(p, mono);
print_desc(p, mono);
else
print_val(p, mono);
if (comment)
@ -464,7 +464,7 @@ parse_dec(char **line, int *num)
}
*num = val;
*line = p;
return 1;
return 1;
}
/*
@ -474,7 +474,7 @@ int
parse_chan(char **line, char *str, int *unit)
{
char *p = *line;
if (!parse_name(&p, str))
return 0;
if (*p < '0' || *p > '9') {
@ -720,7 +720,7 @@ void
list(void)
{
struct info *p, *g;
for (g = infolist; g != NULL; g = nextgrp(g)) {
if (g->mode == MODE_IGNORE)
continue;
@ -772,7 +772,7 @@ ondesc(void *arg, struct siomix_desc *d, int curval)
*/
for (pi = &infolist; (i = *pi) != NULL; pi = &i->next) {
cmp = cmpdesc(d, &i->desc);
if (cmp == 0) {
if (cmp == 0) {
fprintf(stderr, "fatal: duplicate mixer knob:\n");
print_par(i, 0, "duplicate");
exit(1);
@ -884,7 +884,7 @@ main(int argc, char **argv)
perror("malloc");
exit(1);
}
for (;;) {
for (;;) {
nfds = siomix_pollfd(hdl, pfds, POLLIN);
if (nfds == 0)
break;

View File

@ -2081,7 +2081,7 @@ dev_addctl(struct dev *d, char *group, int type, int addr,
ctl_log(c);
log_puts("\n");
}
#endif
#endif
return c;
}
@ -2195,7 +2195,7 @@ dev_label(struct dev *d, int i)
c = c->next;
}
if (strcmp(c->chan0.str, d->slot[i].name) == 0 && c->chan0.unit == i)
return;
return;
strlcpy(c->chan0.str, d->slot[i].name, CTL_NAMEMAX);
c->desc_mask = ~0;
}

View File

@ -44,7 +44,7 @@ clean:
OBJS = xvolkeys.o
xvolkeys: ${OBJS}
${CC} ${LDFLAGS} ${LIB} -o xvolkeys ${OBJS} ${LDADD}
${CC} ${LDFLAGS} ${LIB} -o xvolkeys ${OBJS} ${LDADD}
.c.o:
${CC} ${CFLAGS} ${INCLUDE} ${DEFS} -c $<

View File

@ -237,7 +237,6 @@ main(int argc, char **argv)
case 'v':
verbose++;
break;
case 'q': /* compat */
case 'f':
dev_name = optarg;