diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2007-11-08 21:45:56 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2007-11-08 21:45:56 +0000 |
| commit | 87a194514b4a66c453ad95e7bef46958fbc557ac (patch) | |
| tree | 50ec3e3e6419369fae52c9a35aebcf4c3c1e4729 /sys | |
| parent | 69d3f89624b766cdfc3d6c4f974972ebcfd615bd (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/tty_pty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 01b7ae9960437..b47f5ccc12bc8 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -122,7 +122,7 @@ struct ptsc { #define TSA_PTC_WRITE(tp) ((void *)&(tp)->t_rawq.c_cl) #define TSA_PTS_READ(tp) ((void *)&(tp)->t_canq) -static char *names = "pqrsPQRS"; +static const char names[] = "pqrsPQRS"; /* * This function creates and initializes a pts/ptc pair * @@ -138,7 +138,7 @@ ptyinit(struct cdev *devc, struct thread *td) n = minor2unit(minor(devc)); /* We only allow for up to 32 ptys per char in "names". */ - if (n >= 32 * strlen(names)) + if (n >= 32 * (sizeof(names) - 1)) return (NULL); devc->si_flags &= ~SI_CHEAPCLONE; |
