Loading...
--- Libc/Libc-1725.40.4/gen/get_compat.c
+++ Libc/Libc-583/gen/get_compat.c
@@ -31,6 +31,7 @@
#include <string.h>
#include <pthread.h>
+static bool def_unix03 = false;
/* Catastrophic errors only, including "out of memory" */
static bool parse_error = false;
static bool bootstrapping = false;
@@ -45,7 +46,7 @@
static void check_env_var(void) {
char *mode = getenv("COMMAND_MODE");
-
+
if (mode) {
if (!strcasecmp(mode, "legacy")) {
unix2003_mode = false;
@@ -108,7 +109,7 @@
char *op = NULL;
- if ((op = strpbrk(mode, "!^&|"))) {
+ if (op = strpbrk(mode, "!^&|")) {
if (*op == '!') {
if (op != mode) goto syn_error;
return !compat_mode(function, mode +1);
@@ -117,7 +118,7 @@
/* XXX char tmp[] would be better for left_arg, but
we are not sure what the max size should be... is
alloca(3) frowned on? */
- size_t left_sz = 1 + (op - mode);
+ int left_sz = 1 + (op - mode);
char *left_arg = malloc(left_sz);
strlcpy(left_arg, mode, left_sz);
bool left = compat_mode(function, left_arg);