=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/readlink/readlink.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/readlink/readlink.c 2015/10/09 01:37:08 1.27 --- src/usr.bin/readlink/readlink.c 2019/06/28 13:35:03 1.28 *************** *** 1,5 **** /* ! * $OpenBSD: readlink.c,v 1.27 2015/10/09 01:37:08 deraadt Exp $ * * Copyright (c) 1997 * Kenneth Stailey (hereinafter referred to as the author) --- 1,5 ---- /* ! * $OpenBSD: readlink.c,v 1.28 2019/06/28 13:35:03 deraadt Exp $ * * Copyright (c) 1997 * Kenneth Stailey (hereinafter referred to as the author) *************** *** 76,82 **** if (realpath(argv[0], buf) == NULL) err(1, "%s", argv[0]); } else { ! if ((n = readlink(argv[0], buf, sizeof buf-1)) < 0) exit(1); buf[n] = '\0'; } --- 76,82 ---- if (realpath(argv[0], buf) == NULL) err(1, "%s", argv[0]); } else { ! if ((n = readlink(argv[0], buf, sizeof buf-1)) == -1) exit(1); buf[n] = '\0'; }