_pinfo::_ctty (char *buf)
{
if (!CTTY_IS_VALID (ctty))
- strcpy (buf, "no ctty");
+ stpcpy (buf, "no ctty");
else
{
device d;
char *p;
p = s = (char *) cmalloc_abort (HEAP_COMMUNE, n);
for (char **a = __argv; *a; a++)
- {
- strcpy (p, *a);
- p = strchr (p, '\0') + 1;
- }
+ p = stpcpy (p, *a) + 1;
}
return s;
}
char *p, *s;
p = s = (char *) cmalloc_abort (HEAP_COMMUNE, n);
for (char **e = env; *e; e++)
- {
- strcpy (p, *e);
- p = strchr (p, '\0') + 1;
- }
+ p = stpcpy (p, *e) + 1;
return s;
}