Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N7pyx-0003ft-43 for mharc-grub-devel@gnu.org; Tue, 10 Nov 2009 07:37:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7pyu-0003eh-Gq for grub-devel@gnu.org; Tue, 10 Nov 2009 07:37:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7pyq-0003aH-Sk for grub-devel@gnu.org; Tue, 10 Nov 2009 07:37:56 -0500 Received: from [199.232.76.173] (port=33115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7pyq-0003a5-OP for grub-devel@gnu.org; Tue, 10 Nov 2009 07:37:52 -0500 Received: from mail-pz0-f192.google.com ([209.85.222.192]:62690) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7pyp-0000o2-8Z for grub-devel@gnu.org; Tue, 10 Nov 2009 07:37:51 -0500 Received: by pzk30 with SMTP id 30so2993460pzk.24 for ; Tue, 10 Nov 2009 04:37:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ttOlWRlMfyFF/6NSs3EPVOjxp0sbsbU78MRlRu4Qo8g=; b=TlOcDgWpOo/0bVNdnaHQVuGWYDSTZ3tsFs30HTg5Xn6IzHvasZWRg6u+7tEnqQfQCd aKEbW9x4J/2fLVV37zZc4BE+OWmxshMXd1p2MzcM0iVj+pQqFuzg2ienpL2TP/PFMuyC HEnpiYjfe+bE6pXC3fXY/sovS9fblcSEjThUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=NWMoTzLMRqzQ1wJeyBYtZ5wxwta9RkHLRx3MSSVDsKrWe3FQ/DMIq2iUXCFlJdtxCa yPhO8u24T+NShgKEfjCIejU4LqhKqPyckKQtUiM/lYBe9IBsWTg7jw0FJbTwMqsfXZea KOvzAuvV2929W6eYFCT5DC1VoChpxjgBMx8mk= MIME-Version: 1.0 Received: by 10.140.166.21 with SMTP id o21mr505932rve.210.1257856670149; Tue, 10 Nov 2009 04:37:50 -0800 (PST) In-Reply-To: References: <20091109010422.GA23417@thorin> <4AF86387.7090307@gmail.com> <4AF885EE.7000709@duboucher.eu> <4AF88AEF.8010102@gmail.com> Date: Tue, 10 Nov 2009 20:37:50 +0800 Message-ID: From: Bean To: The development of GNU GRUB Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Imminent bugfix release (1.97.1) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 12:37:56 -0000 Hi, Oh, I just come up with a better way to do this: typedef char grub_password_t[1024]; int grub_auth_strcmp (const grub_password_t s1, const grub_password_t s2) { char r1 = 0; char r2 = 0; char *p; int i, c; p = &r1; c = 0; for (i = 0; i < sizeof (grub_password_t); i++, s1++, s2++) { *p | = (*s1 ^ *s2); if ((int) *s1 == c) { p = &r2; c = 0x100; } } return (r1 != 0); } The condition (int) *s1 == c would be true exactly once. -- Bean My repository: https://launchpad.net/burg Document: https://help.ubuntu.com/community/Burg