Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jun 2007 13:02:16 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sbin/sysctl sysctl.c
Message-ID:  <200706111302.l5BD2GcT000865@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706111302.l5BD2GcT000865>