diff options
Diffstat (limited to 'apps/netutils/tftpc')
-rw-r--r-- | apps/netutils/tftpc/tftpc_get.c | 2 | ||||
-rw-r--r-- | apps/netutils/tftpc/tftpc_put.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/netutils/tftpc/tftpc_get.c b/apps/netutils/tftpc/tftpc_get.c index e0779d17d..f4fb74dd3 100644 --- a/apps/netutils/tftpc/tftpc_get.c +++ b/apps/netutils/tftpc/tftpc_get.c @@ -167,7 +167,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, bool binary) if (!packet) { ndbg("packet memory allocation failure\n"); - errno = ENOMEM; + set_errno(ENOMEM); goto errout; } diff --git a/apps/netutils/tftpc/tftpc_put.c b/apps/netutils/tftpc/tftpc_put.c index 4d87ba908..c292244a6 100644 --- a/apps/netutils/tftpc/tftpc_put.c +++ b/apps/netutils/tftpc/tftpc_put.c @@ -334,7 +334,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (!packet) { ndbg("packet memory allocation failure\n"); - errno = ENOMEM; + set_errno(ENOMEM); goto errout; } @@ -388,7 +388,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (++retry > TFTP_RETRIES) { ndbg("Retry count exceeded\n"); - errno = ETIMEDOUT; + set_errno(ETIMEDOUT); goto errout_with_sd; } } @@ -455,7 +455,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (++retry > TFTP_RETRIES) { ndbg("Retry count exceeded\n"); - errno = ETIMEDOUT; + set_errno(ETIMEDOUT); goto errout_with_sd; } } |