Fix logname(1) not reseting errno before logname(3).

Thanks to ybden for spotting this bug.
This commit is contained in:
Jonas 'Sortie' Termansen 2017-06-27 21:44:11 +02:00
parent 1759f690b6
commit 326e43f3e9
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ int main(int argc, char* argv[])
if ( 1 < argc )
errx(1, "unexpected extra operand");
errno = 0;
char* login_name = getlogin();
if ( !login_name )
{