cvs commit: src/sbin/sysctl sysctl.c

Bruce Evans bde at FreeBSD.org
Mon Jun 11 13:02:17 UTC 2007


bde         2007-06-11 13:02:16 UTC

  FreeBSD src repository

  Modified files:
    sbin/sysctl          sysctl.c 
  Log:
  When we return from a "show" function without printing anything except
  a warning, return 1 instead of 0 to indicate that we didn't print
  anything, so that top-level callers don't print a spurious newline.
  This is mainly to fix output formatting when stderr is redirected.  It
  also helps in some cases when stderr is interleaved with stdout,
  depending on the details of the interleaving (this program has the
  usual null explicit support for syncing stderr with stdout).
  
  Return 1 instead of -1 after printing the "malloc failed" warning, since
  the return value is boolean.
  
  Revision  Changes    Path
  1.86      +6 -6      src/sbin/sysctl/sysctl.c


More information about the cvs-all mailing list