]> git.klezlab.it Git - klez/parrotsay-lite.git/commitdiff
forgot EXIT_SUCCESS and EXIT_FAILURE are a thing
authorFederico klez Culloca <klez@klezlab.it>
Sat, 13 Jun 2026 19:33:14 +0000 (21:33 +0200)
committerFederico klez Culloca <klez@klezlab.it>
Sat, 13 Jun 2026 19:33:14 +0000 (21:33 +0200)
parrotsay.c

index b56add32308860ee026c6c5cdfd0ed3f707e7ac8..f35fa201846a8242b31bd4e3a6e3529e597d4d10 100644 (file)
@@ -86,7 +86,7 @@ int main(int argc, char** argv) {
             char* tmp = realloc(*message_rows, message_rows_length);
             if (tmp == NULL) {
                 fprintf(stderr, "Error: %s", strerror(errno));
-                exit(1);
+                exit(EXIT_FAILURE);
             }
             *message_rows = tmp;
             if(i != 1) {
@@ -105,7 +105,7 @@ int main(int argc, char** argv) {
                 char **tmp = realloc(message_rows, sizeof(char*) * buffer_size);
                 if (tmp == NULL) {
                     fprintf(stderr, "Error: %s", strerror(errno));
-                    exit(1);
+                    exit(EXIT_FAILURE);
                 }
                 message_rows = tmp;
             }
@@ -135,6 +135,6 @@ int main(int argc, char** argv) {
 
     printf("%s", parrot);
 
-    return 0;
+    return EXIT_SUCCESS;
 }