diff options
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 26 |
1 files changed, 18 insertions, 8 deletions
@@ -1468,12 +1468,17 @@ va_dcl if (outlevel == O_VERBOSE) { - if (shroud) + char *cp; + + if (shroud && (cp = strstr(buf, shroud))) { - char *cp; + char *sp; - if ((cp = strstr(buf, shroud))) - memset(cp, '*', strlen(shroud)); + sp = cp + strlen(shroud); + *cp++ = '*'; + while (*sp) + *cp++ = *sp++; + *sp = '\0'; } buf[strlen(buf)-2] = '\0'; error(0, 0, "%s> %s", protocol->name, buf); @@ -1533,12 +1538,17 @@ va_dcl if (outlevel == O_VERBOSE) { - if (shroud) + char *cp; + + if (shroud && (cp = strstr(buf, shroud))) { - char *cp; + char *sp; - if ((cp = strstr(buf, shroud))) - memset(cp, '*', strlen(shroud)); + sp = cp + strlen(shroud); + *cp++ = '*'; + while (*sp) + *cp++ = *sp++; + *sp = '\0'; } buf[strlen(buf)-1] = '\0'; error(0, 0, "%s> %s", protocol->name, buf); |