Skip to content

Commit

Permalink
Make sure we pick up the right statement in any case.
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Nov 13, 2015
1 parent e073997 commit ef88d09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions core/unix/src/TUnixSystem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 293,8 @@ struct TUtmpContent {
#ifdef __has_feature
# if __has_feature(modules)
if (ue->ut_user[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
# else
if (ue->ut_name[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
# endif
#elif
if (ue->ut_name[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
Expand Down
8 changes: 5 additions & 3 deletions rootx/src/rootx.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 206,14 @@ static STRUCT_UTMP *SearchEntry(int n, const char *tty)
// (See https://llvm.org/bugs/show_bug.cgi?id=24533)
#ifdef __has_feature
# if __has_feature(modules)
if (ue->ut_user[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
if (ue->ut_user[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
# else
if (ue->ut_name[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
# endif
#elif
if (ue->ut_name[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
if (ue->ut_name[0] && !strncmp(tty, ue->ut_line, sizeof(ue->ut_line)))
#endif
return ue;
return ue;
ue ;
}
return 0;
Expand Down

0 comments on commit ef88d09

Please sign in to comment.