Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Apr 2007 13:21:43 +0000 (UTC)
From:      Yar Tikhiy <yar@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sbin/mdmfs mdmfs.c
Message-ID:  <200704301321.l3UDLhSX096829@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
yar         2007-04-30 13:21:43 UTC

  FreeBSD src repository

  Modified files:
    sbin/mdmfs           mdmfs.c 
  Log:
  Fix a typo: argv -> argvp
  
  Rationale:
  We are interested in the current (last) element of the argv array
  there, not in its first element.  The if construct is there because
  we want to avoid adding empty (zero-length) arguments to argv, so
  we just don't advance argvp if the current argument is empty, and
  it gets overwritten at the next iteration.  Note that strsep(3)
  doesn't treat consecutive delim characters as a single separator,
  it returns empty fields between such characters, and it's up to the
  caller to handle them this or that way.
  
  Also add a comment that the argv array ends up null-terminated in
  any case (it's due to the design of the for loop) as an answer to
  a possible question why the whole argv isn't zero-filled.
  
  Submitted by:   yongari
  Tested by:      yongari
  MFC after:      3 days
  
  Revision  Changes    Path
  1.32      +2 -1      src/sbin/mdmfs/mdmfs.c



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