From bd81e010f8637b0139aacb1da88717d42b08052e Mon Sep 17 00:00:00 2001 From: kYc0o Date: Tue, 4 Apr 2017 01:51:28 +0200 Subject: [PATCH] examples/gnrc_tftp: avoid to print NULL --- examples/gnrc_tftp/tftp_client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/gnrc_tftp/tftp_client.c b/examples/gnrc_tftp/tftp_client.c index 5e89530ee..794c1cd69 100644 --- a/examples/gnrc_tftp/tftp_client.c +++ b/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)