All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Barada <peter.barada@logicpd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] env: fix env var autocompletion
Date: Tue, 05 Apr 2011 00:44:49 -0400	[thread overview]
Message-ID: <4D9A9E41.9000901@logicpd.com> (raw)
In-Reply-To: <201104042153.16448.vapier@gentoo.org>

> On Monday, April 04, 2011 21:17:45 Kim Phillips wrote:
>> commit 560d424b6d7cd4205b062ad95f1b104bd4f8bcc3 "env: re-add
>> support for auto-completion" fell short of its description -
>> the 'used' logic in hmatch_r was reversed - 'used' is 0 if
>> the hash table entry is not used, or -1 if deleted.  This
>> patch makes hmatch_r actually match on valid ('used') entries,
>> instead of skipping them and failing to match anything.
> i dont think my commit is wrong.  i think the bug you describe was actually 
> added in c81c1222427f268d29ba999c82e2477c428e7bab.
You're right; I accidentally inverted the condition in my patch; it orignally was:

    if (!htab->table[idx].used)
        continue;

Since a deleted entry is now -1 (and an unused entry is zero), the condition should have been:

    if (htab->table[idx].used <= 0)
        continue;

not:

    if (htab->table[idx].used > 0)
        continue;
> -mike


-- 
Peter Barada
peter.barada at logicpd.com

  reply	other threads:[~2011-04-05  4:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05  1:17 [U-Boot] env: fix env var autocompletion Kim Phillips
2011-04-05  1:53 ` Mike Frysinger
2011-04-05  4:44   ` Peter Barada [this message]
2011-04-05 17:14     ` [U-Boot] [PATCH v2] lib/hashtable: " Kim Phillips
2011-04-15  7:57       ` Mike Frysinger
2011-04-27 22:55       ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D9A9E41.9000901@logicpd.com \
    --to=peter.barada@logicpd.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.