return __normalize_whitespace(str, sz, str, sz + 1);
}
-static inline void strrep(char *s, int find, int replace)
+static inline void ul_strrep(char *s, int find, int replace)
{
while (s && *s && (s = strchr(s, find)) != NULL)
*s++ = replace;
}
-static inline void strrem(char *s, int rem)
+static inline void ul_strrem(char *s, int rem)
{
char *p;
/* Name */
vu->name = xstrdup(d->d_name);
*vu->name = toupper(*vu->name);
- strrep(vu->name, '_', ' ');
+ ul_strrep(vu->name, '_', ' ');
/* Description */
vu->text = str;
p = (char *) ul_startswith(vu->text, "Mitigation");
if (p) {
*p = ';';
- strrem(vu->text, ':');
+ ul_strrem(vu->text, ':');
}
}
closedir(dir);
break;
}
if (*buf) {
- strrem(buf, '\n');
+ ul_strrem(buf, '\n');
step->value = strrealloc(step->value, buf);
if (!step->value)
err_oom();
case 'c':
ctl.command = optarg;
ctl.command_norm = xstrdup(ctl.command);
- strrep(ctl.command_norm, '\n', ' ');
+ ul_strrep(ctl.command_norm, '\n', ' ');
break;
case 'E':
if (strcmp(optarg, "auto") == 0)
errx(EXIT_FAILURE, _("failed to concatenate arguments"));
ctl.command_norm = xstrdup(ctl.command);
- strrep(ctl.command_norm, '\n', ' ');
+ ul_strrep(ctl.command_norm, '\n', ' ');
argc = 0;
}