/* Prevent write access for other users so they can't use wall to send
* messages to this program. */
if (!public) {
- name = ptsname(ptm);
- if (!name) {
- return -1;
- }
- if (chmod(name, S_IRUSR | S_IWUSR) != 0) {
- return -1;
- }
+ name = ptsname(ptm);
+ if (!name) {
+ return -1;
+ }
+ if (chmod(name, S_IRUSR | S_IWUSR) != 0) {
+ return -1;
+ }
}
if (unlockpt(ptm) != 0) {