=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshlogin.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- src/usr.bin/ssh/sshlogin.c 2015/01/20 23:14:00 1.31 +++ src/usr.bin/ssh/sshlogin.c 2015/12/26 20:51:35 1.32 @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.31 2015/01/20 23:14:00 deraadt Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.32 2015/12/26 20:51:35 guenther Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -83,7 +83,7 @@ if (fd < 0) return 0; - pos = (long) uid * sizeof(ll); + pos = (off_t)uid * sizeof(ll); r = lseek(fd, pos, SEEK_SET); if (r == -1) { error("%s: lseek: %s", __func__, strerror(errno)); @@ -176,7 +176,7 @@ strncpy(ll.ll_host, host, sizeof(ll.ll_host)); fd = open(lastlog, O_RDWR); if (fd >= 0) { - lseek(fd, (off_t) ((long) uid * sizeof(ll)), SEEK_SET); + lseek(fd, (off_t)uid * sizeof(ll), SEEK_SET); if (write(fd, &ll, sizeof(ll)) != sizeof(ll)) logit("Could not write %.100s: %.100s", lastlog, strerror(errno)); close(fd);