Browse Source

examples/gnrc_tftp: avoid to print NULL

pr/rotary
kYc0o 6 years ago
parent
commit
bd81e010f8
  1. 7
      examples/gnrc_tftp/tftp_client.c

7
examples/gnrc_tftp/tftp_client.c

@ -118,7 +118,12 @@ static void _tftp_client_stop_cb(tftp_event_t event, const char *msg)
}
/* print the transfer result to the console */
printf("tftp_client: %s: %s\n", cause, msg);
if (msg != NULL) {
printf("tftp_client: %s: %s\n", cause, msg);
}
else {
printf("tftp_client: %s\n", cause);
}
}
static int _tftp_client_cmd(int argc, char * *argv)

Loading…
Cancel
Save