Show function errors in testclient-promisc.c

This commit is contained in:
XANTRONIX Development 2020-07-03 15:18:58 -04:00 committed by XANTRONIX Industrial
parent 08389b8781
commit 1abf0890d9

View file

@ -80,13 +80,15 @@ int main(int argc, char **argv) {
patty_ax25_frame frame; patty_ax25_frame frame;
if (patty_ax25_frame_decode(&frame, PATTY_AX25_FRAME_NORMAL, buf, readlen) < 0) { if (patty_ax25_frame_decode(&frame, PATTY_AX25_FRAME_NORMAL, buf, readlen) < 0) {
perror("Unable to decode frame"); fprintf(stderr, "%s: %s: %s\n",
argv[0], "patty_ax25_frame_decode()", strerror(errno));
goto error_ax25_frame_decode; goto error_ax25_frame_decode;
} }
if (patty_print_frame(stdout, &frame, buf, readlen) < 0) { if (patty_print_frame(stdout, &frame, buf, readlen) < 0) {
perror("Unable to print frame"); fprintf(stderr, "%s: %s: %s\n",
argv[0], "patty_print_frame()", strerror(errno));
goto error_print_frame; goto error_print_frame;
} }