1
0
mirror of https://github.com/ericonr/sndio.git synced 2024-02-18 04:45:21 -06:00

log slot details only if its allocated

This commit is contained in:
Alexandre Ratchov 2012-10-08 18:26:44 +02:00
parent a525ed859b
commit 792b22dc90

View File

@ -101,10 +101,12 @@ slot_log(struct slot *s)
if (log_level >= 3) { if (log_level >= 3) {
log_puts(",vol="); log_puts(",vol=");
log_putu(s->vol); log_putu(s->vol);
log_puts(",pst="); if (s->ops) {
log_puts(pstates[s->pstate]); log_puts(",pst=");
log_puts(",mmc="); log_puts(pstates[s->pstate]);
log_puts(tstates[s->tstate]); log_puts(",mmc=");
log_puts(tstates[s->tstate]);
}
} }
#endif #endif
} }