=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshkey-xmss.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/ssh/sshkey-xmss.c 2019/06/27 18:03:37 1.4 +++ src/usr.bin/ssh/sshkey-xmss.c 2019/06/28 13:35:04 1.5 @@ -1,4 +1,4 @@ -/* $OpenBSD: sshkey-xmss.c,v 1.4 2019/06/27 18:03:37 deraadt Exp $ */ +/* $OpenBSD: sshkey-xmss.c,v 1.5 2019/06/28 13:35:04 deraadt Exp $ */ /* * Copyright (c) 2017 Markus Friedl. All rights reserved. * @@ -467,12 +467,12 @@ ret = SSH_ERR_ALLOC_FAIL; goto done; } - if ((lockfd = open(lockfile, O_CREAT|O_RDONLY, 0600)) < 0) { + if ((lockfd = open(lockfile, O_CREAT|O_RDONLY, 0600)) == -1) { ret = SSH_ERR_SYSTEM_ERROR; PRINT("%s: cannot open/create: %s", __func__, lockfile); goto done; } - while (flock(lockfd, LOCK_EX|LOCK_NB) < 0) { + while (flock(lockfd, LOCK_EX|LOCK_NB) == -1) { if (errno != EWOULDBLOCK) { ret = SSH_ERR_SYSTEM_ERROR; PRINT("%s: cannot lock: %s", __func__, lockfile); @@ -607,7 +607,7 @@ PRINT("%s: ENCRYPT FAILED: %d", __func__, ret); goto done; } - if ((fd = open(nstatefile, O_CREAT|O_WRONLY|O_EXCL, 0600)) < 0) { + if ((fd = open(nstatefile, O_CREAT|O_WRONLY|O_EXCL, 0600)) == -1) { ret = SSH_ERR_SYSTEM_ERROR; PRINT("%s: open new state file: %s", __func__, nstatefile); goto done; @@ -626,13 +626,13 @@ close(fd); goto done; } - if (fsync(fd) < 0) { + if (fsync(fd) == -1) { ret = SSH_ERR_SYSTEM_ERROR; PRINT("%s: sync new state file: %s", __func__, nstatefile); close(fd); goto done; } - if (close(fd) < 0) { + if (close(fd) == -1) { ret = SSH_ERR_SYSTEM_ERROR; PRINT("%s: close new state file: %s", __func__, nstatefile); goto done; @@ -646,7 +646,7 @@ goto done; } } - if (rename(nstatefile, statefile) < 0) { + if (rename(nstatefile, statefile) == -1) { ret = SSH_ERR_SYSTEM_ERROR; PRINT("%s: rename %s to %s", __func__, nstatefile, statefile); goto done;