Mercurial > dropbear
diff dbutil.c @ 117:e0acad552a92 private-rez
Read the last line of a file without a finishing '\n' correctly
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 02 Sep 2004 18:36:11 +0000 |
parents | 2e9d1f29c50f |
children | a0db9a23f6d4 |
line wrap: on
line diff
--- a/dbutil.c Thu Sep 02 15:24:17 2004 +0000 +++ b/dbutil.c Thu Sep 02 18:36:11 2004 +0000 @@ -506,18 +506,17 @@ out: - buf_setpos(line, 0); /* if we didn't read anything before EOF or error, exit */ if (c == EOF && line->pos == 0) { - TRACE(("leave getauthline: failure")); + TRACE(("leave buf_getline: failure")); return DROPBEAR_FAILURE; } else { - TRACE(("leave getauthline: success")); + TRACE(("leave buf_getline: success")); + buf_setpos(line, 0); return DROPBEAR_SUCCESS; } - TRACE(("leave buf_getline")); } #endif