summaryrefslogtreecommitdiffstats
path: root/usr.bin/talk
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/talk')
-rw-r--r--usr.bin/talk/get_names.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/talk/get_names.c b/usr.bin/talk/get_names.c
index 965120a..8da8e4a 100644
--- a/usr.bin/talk/get_names.c
+++ b/usr.bin/talk/get_names.c
@@ -80,8 +80,7 @@ get_names(int argc, char *argv[])
gethostname(hostname, sizeof (hostname));
my_machine_name = hostname;
/* check for, and strip out, the machine name of the target */
- for (cp = argv[1]; *cp && !index("@:!", *cp); cp++)
- ;
+ cp = argv[1] + strcspn(argv[1], "@:!");
if (*cp == '\0') {
/* this is a local to local talk */
his_name = argv[1];
OpenPOWER on IntegriCloud