Fix logname(1) not reseting errno before logname(3).
Thanks to ybden for spotting this bug.
This commit is contained in:
parent
1759f690b6
commit
326e43f3e9
1 changed files with 1 additions and 0 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue