Gedare Bloom started a new discussion on cpukit/libmisc/shell/shell.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/300#note_114794

 >        return false;
 >      }
 >      /* Make a raw terminal, Linux Manuals */
 > -    if (tcgetattr(fileno(stdin), &previous_term) >= 0) {
 > +    have_previous_term = tcgetattr(fileno(stdin), &previous_term);
 > +    if (have_previous_term == 0) {

The wording is strange, because of using 0 for checking for truth. It might be 
more readable to use:

\`\`\`int have_previous_term = 0;

...

have_previous_term = (tcgetattr(...) == 0);

if (have_previous_term) ...

\`\`\`

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/300#note_114794
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to