diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-29 10:08:04 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-29 10:08:04 -0600 |
commit | 63d346326244a2f93f93fb51925fdef980af76a0 (patch) | |
tree | 3390de233138586cd99d80ecd0dd829df9d78f8d /apps/examples | |
parent | ad264c715c24cf0dea6c06f872038b259bcd8f2f (diff) | |
download | px4-nuttx-63d346326244a2f93f93fb51925fdef980af76a0.tar.gz px4-nuttx-63d346326244a2f93f93fb51925fdef980af76a0.tar.bz2 px4-nuttx-63d346326244a2f93f93fb51925fdef980af76a0.zip |
Reorder statements: printf clobbers errno value
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/udgram/udgram_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/examples/udgram/udgram_client.c b/apps/examples/udgram/udgram_client.c index c24ba8a81..ece6cb607 100644 --- a/apps/examples/udgram/udgram_client.c +++ b/apps/examples/udgram/udgram_client.c @@ -124,7 +124,6 @@ int client_main(int argc, char *argv[]) printf("client: %d. Sending %d bytes\n", offset, SENDSIZE); nbytes = sendto(sockfd, outbuf, SENDSIZE, 0, (struct sockaddr *)&server, addrlen); - printf("client: %d. Sent %d bytes\n", offset, nbytes); if (nbytes < 0) { @@ -140,6 +139,8 @@ int client_main(int argc, char *argv[]) return 1; } + printf("client: %d. Sent %d bytes\n", offset, nbytes); + /* Now, sleep a bit. No packets should be dropped due to overrunning * the server. */ |