#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;
static void check_env_var(void) {
char *mode = getenv("COMMAND_MODE");
-
+
if (mode) {
if (!strcasecmp(mode, "legacy")) {
unix2003_mode = false;
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);
/* 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? */
- int left_sz = 1 + (op - mode);
+ size_t left_sz = 1 + (op - mode);
char *left_arg = malloc(left_sz);
strlcpy(left_arg, mode, left_sz);
bool left = compat_mode(function, left_arg);