diff --git a/Libraries/LibC/stdio.cpp b/Libraries/LibC/stdio.cpp index 2de6f2d95d..1c473c3288 100644 --- a/Libraries/LibC/stdio.cpp +++ b/Libraries/LibC/stdio.cpp @@ -913,8 +913,8 @@ static int parse_mode(const char* mode) // NOTE: rt is a non-standard mode which opens a file for read, explicitly // specifying that it's a text file - for (; *mode; ++mode) { - switch (*mode) { + for (auto* ptr = mode; *ptr; ++ptr) { + switch (*ptr) { case 'r': flags |= O_RDONLY; break; @@ -937,8 +937,7 @@ static int parse_mode(const char* mode) // Ok... break; default: - dbg() << "Unsupported mode _" << mode << "_ (because of '" << *mode << "')"; - ASSERT_NOT_REACHED(); + dbg() << "Potentially unsupported fopen mode _" << mode << "_ (because of '" << *ptr << "')"; } } diff --git a/Ports/dropbear/patches/fopen-c.patch b/Ports/dropbear/patches/fopen-c.patch deleted file mode 100644 index cd76e100a9..0000000000 --- a/Ports/dropbear/patches/fopen-c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compat.c -+++ b/compat.c -@@ -244,7 +244,7 @@ - if (strings != NULL) - free(strings); - strings = NULL; -- if ((fp = fopen("/etc/shells", "rc")) == NULL) -+ if ((fp = fopen("/etc/shells", "r")) == NULL) - return (char **) okshells; - if (fstat(fileno(fp), &statb) == -1) { - (void)fclose(fp);