Mercurial > dropbear
comparison loginrec.c @ 1523:1d163552145f coverity
merge coverity
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 19 Feb 2018 23:14:49 +0800 |
parents | c7675aa88880 |
children |
comparison
equal
deleted
inserted
replaced
1510:eb4c7052f51d | 1523:1d163552145f |
---|---|
1328 /* find this uid's offset in the lastlog file */ | 1328 /* find this uid's offset in the lastlog file */ |
1329 offset = (off_t) ((long)li->uid * sizeof(struct lastlog)); | 1329 offset = (off_t) ((long)li->uid * sizeof(struct lastlog)); |
1330 | 1330 |
1331 if ( lseek(*fd, offset, SEEK_SET) != offset ) { | 1331 if ( lseek(*fd, offset, SEEK_SET) != offset ) { |
1332 dropbear_log(LOG_WARNING, "lastlog_openseek: %s->lseek(): %s", | 1332 dropbear_log(LOG_WARNING, "lastlog_openseek: %s->lseek(): %s", |
1333 lastlog_file, strerror(errno)); | 1333 lastlog_file, strerror(errno)); |
1334 m_close(*fd); | |
1334 return 0; | 1335 return 0; |
1335 } | 1336 } |
1336 } | 1337 } |
1337 | 1338 |
1338 return 1; | 1339 return 1; |