ping: use |=, not =, when combine option bit mask
[oweals/busybox.git] / mailutils / mime.c
index b856c8149df20c8d566f3be6c49c5fca93605d89..17d0f9d8066ba5b885473b97a85097df0b18cb6c 100644 (file)
@@ -177,7 +177,8 @@ int makemime_main(int argc UNUSED_PARAM, char **argv)
 static const char *find_token(const char *const string_array[], const char *key, const char *defvalue)
 {
        const char *r = NULL;
-       for (int i = 0; string_array[i] != 0; i++) {
+       int i;
+       for (i = 0; string_array[i] != NULL; i++) {
                if (strcasecmp(string_array[i], key) == 0) {
                        r = (char *)string_array[i+1];
                        break;
@@ -292,7 +293,7 @@ static int parse(const char *boundary, char **argv)
                                }
                                // parent dumps to fd[1]
                                close(fd[0]);
-                               fp = fdopen(fd[1], "w");
+                               fp = xfdopen_for_write(fd[1]);
                                signal(SIGPIPE, SIG_IGN); // ignore EPIPE
                        // or create a file for dump
                        } else {