cvs commit: src/sbin/gbde gbde.c

Maxim Sobolev sobomax at FreeBSD.org
Fri Jun 25 06:04:50 PDT 2004


sobomax     2004-06-25 13:04:49 UTC

  FreeBSD src repository

  Modified files:
    sbin/gbde            gbde.c 
  Log:
  o Fix semantics of comparison function for qsort(3). According to qsort(3)
    manpage:
  
       The comparison function must return an integer less than, equal to, or
       greater than zero if the first argument is considered to be respectively
       less than, equal to, or greater than the second.
  
    Therefore, simply returning "arg1 > arg2" is incorrect. Actually it works
    but for the number of items to be sorted less than 7 due to special case
    handling in qsort(3);
  
  o add missing '\n' to one of usage() calls.
  
  Approved by:    phk
  
  Revision  Changes    Path
  1.23      +6 -2      src/sbin/gbde/gbde.c


More information about the cvs-src mailing list