Gedare Bloom started a new discussion on cpukit/libcsupport/src/getgrent.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1250#note_150562

 > +  }
 > +
 > +  end = line + linesize;
 > +  colon_count = 0;
 > +
 > +  for (p = line; p < end && colon_count < needed; ++p) {
 > +    if (*p == ':') {
 > +      ++colon_count;
 > +    }
 > +  }
 > +
 > +  if (colon_count < needed) {
 > +    return 0;
 > +  }
 > +
 > +  switch (how) {

since there's only two cases here, I'd use `if-else` instead of `switch`

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1250#note_150562
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