[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] lxcFreezeContainer: avoid test-after-deref of never-NULL pointer



Eric Blake wrote:

> On 05/17/2010 11:53 AM, Jim Meyering wrote:
>>> Very good idea.
>>> Here's a patch to do that.
>>> With this, "make sc_avoid_if_before_free" (part of make syntax-check)
>>> will now prevent any new useless checks.
>>> The above was the sole offender.
>>
>> Actually, this is just the tip of the iceberg.
>> A couple minutes work have shown that there are many more:
>>
>> Running this shows there are potentially at least 100
>> candidate functions:
>>
>>   aid free|grep '^vi'
>
> aid?  Cool alias/shell script on just your machine?

It's a program from the id-utils package:

  http://www.gnu.org/software/id-utils/

You run "mkid" to create an index (or "make ID" in
an automake-enabled project), then commands like
aid, lid, gid, aid, eid, etc. do useful things.

These tools used to be essential, but "git grep" and fast
disks have come a long ways to rendering "gid" unnecessary.

  $ aid --help
  Usage: aid [OPTION]... PATTERN...
  Query ID database and report results.
  By default, output consists of multiple lines, each line containing the
  matched identifier followed by the list of file names in which it occurs.

    -f, --file=FILE       file name of ID database

    -i, --ignore-case     match PATTERN case insensitively
    -l, --literal         match PATTERN as a literal string
    -r, --regexp          match PATTERN as a regular expression
    -w, --word            match PATTERN as a delimited word
    -s, --substring       match PATTERN as a substring
              Note: If PATTERN contains extended regular expression meta-
              characters, it is interpreted as a regular expression substring.
              Otherwise, PATTERN is interpreted as a literal word.

    -k, --key=STYLE       STYLE is one of `token', `pattern' or `none'
    -R, --result=STYLE    STYLE is one of `filenames', `grep', `edit' or `none'
    -S, --separator=STYLE  STYLE is one of `braces', `space' or `newline' and
                          only applies to file names when `--result=filenames'
              The above STYLE options control how query results are presented.
              Defaults are --key=token --result=filenames --separator=space

    -F, --frequency=FREQ  find tokens that occur FREQ times, where FREQ
                          is a range expressed as `N..M'.  If N is omitted, it
                          defaults to 1, if M is omitted it defaults to MAX_USHRT
    -a, --ambiguous=LEN   find tokens whose names are ambiguous for LEN chars

    -x, --hex             only find numbers expressed as hexadecimal
    -d, --decimal         only find numbers expressed as decimal
    -o, --octal           only find numbers expressed as octal
              By default, searches match numbers of any radix.

        --help            display this help and exit
        --version         output version information and exit

  Report bugs to bug-idutils gnu org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]