From 7af899f21bad93c7aac0957388d2712d6c2cee84 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 17 Feb 2013 17:51:51 +0100 Subject: Fix compiler warning about usage of exit() in mime_client example --- examples/nanohttp/mime_client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/nanohttp/mime_client.c b/examples/nanohttp/mime_client.c index ffa8de7..b6fe8b0 100755 --- a/examples/nanohttp/mime_client.c +++ b/examples/nanohttp/mime_client.c @@ -118,7 +118,7 @@ int main(int argc, char **argv) if (argc < 5) { fprintf(stderr, "usage %s \n", argv[0]); - exit(1); + return -1; } /* Set log level to see more information written by the library */ @@ -129,7 +129,7 @@ int main(int argc, char **argv) { fprintf(stderr, "Cannot init httpc (%s)\n", herror_message(status)); herror_release(status); - return 1; + return -1; } /* Create the client connection object */ @@ -144,13 +144,13 @@ int main(int argc, char **argv) { fprintf(stderr, "Can not start MIME: %s\n", herror_message(status)); herror_release(status); - exit(1); + return -1; } if (!send_file(conn, argv[2], argv[3], argv[4])) { fprintf(stderr, "send_file failed\n"); - exit(1); + return -1; } while (1) @@ -166,14 +166,14 @@ int main(int argc, char **argv) gets(content_type); if (!send_file(conn, file, id, content_type)) - exit(1); + return -1; } if ((status = httpc_mime_end(conn, &res)) != H_OK) { fprintf(stderr, "httpc_mime_end failed (%s)\n", herror_message(status)); herror_release(status); - exit(1); + return -1; } /* Show response */ -- cgit v1.1-32-gdbae