From 0b7376a1adaf70f2853ff0bf77f7d8241fbc669e Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 12 Jan 2007 02:06:34 +0000 Subject: [PATCH] * histrap.c: picky /a1/sw/pkgs/gcc-3.4.3/bin/../lib/gcc/sparc-sun-solaris2.8/3.4.3/ * main.c: thinko --- histrap.c | 4 ++-- main.c | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/histrap.c b/histrap.c index 3b1db48..1e152e2 100644 --- a/histrap.c +++ b/histrap.c @@ -3,7 +3,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.38 2007/01/12 01:49:28 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.39 2007/01/12 02:06:34 tg Exp $"); Trap sigtraps[NSIG + 1]; static struct sigaction Sigact_ign, Sigact_trap; @@ -986,7 +986,7 @@ inittraps(void) sigtraps[i].name = s = str_save( !strncasecmp(cs, "SIG", 3) ? cs + 3 : cs, APERM); - while (*s = ksh_toupper(*s)) + while ((*s = ksh_toupper(*s))) ++s; } #if HAVE_SYS_SIGLIST diff --git a/main.c b/main.c index 6de5206..8246711 100644 --- a/main.c +++ b/main.c @@ -13,7 +13,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.65 2007/01/11 00:32:31 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.66 2007/01/12 02:06:34 tg Exp $"); extern char **environ; @@ -137,10 +137,9 @@ main(int argc, char *argv[]) def_path = _PATH_DEFPATH; #else #ifdef _CS_PATH - if ((len = confstr(_CS_PATH, NULL, 0)) != (size_t)-1 && - len > 0 && confstr(_CS_PATH, new = alloc(len + 1, APERM), - len + 1) == len + 1) - def_path = new; + if ((k = confstr(_CS_PATH, NULL, 0)) != (size_t)-1 && k > 0 && + confstr(_CS_PATH, cp = alloc(k + 1, APERM), k + 1) == k + 1) + def_path = cp; else #endif def_path = "/bin:/usr/bin:/sbin:/usr/sbin";