Don't print info len on non-UI frames

This commit is contained in:
XANTRONIX Development 2020-07-08 18:34:02 -04:00 committed by XANTRONIX Industrial
parent ebbfb50b1c
commit c2766a4405

View file

@ -112,8 +112,17 @@ int patty_print_frame(FILE *fh,
goto error_io; goto error_io;
} }
} else if (PATTY_AX25_CONTROL_UNNUMBERED(frame->control)) { } else if (PATTY_AX25_CONTROL_UNNUMBERED(frame->control)) {
if (fprintf(fh, " type U info %zu bytes", if (fprintf(fh, " type U") < 0) {
frame->infolen) < 0) { goto error_io;
}
if (PATTY_AX25_CONTROL_UNNUMBERED_INFO(frame->control)) {
if (fprintf(fh, " info %zu bytes", frame->infolen) < 0) {
goto error_io;
}
}
} else if (PATTY_AX25_CONTROL_SUPER(frame->control)) {
if (fprintf(fh, " type S") < 0) {
goto error_io; goto error_io;
} }
} }