From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117883 invoked by alias); 22 Mar 2018 17:35:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 117872 invoked by uid 89); 22 Mar 2018 17:35:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=M=c3=a4r, Mr, m=c3=a4r, HContent-Transfer-Encoding:8bit?= X-HELO: mail-out.m-online.net X-Auth-Info: 7c1xOquW9GifyQhJce52TeSGyhyJp15ohYMhkfKF2+XeMD5B2Ahne2S43XQZxcLs From: Andreas Schwab To: Jesse Hathaway Cc: Adhemerval Zanella , libc-alpha@sourceware.org Subject: Re: [PATCH] getlogin_r: return early when linux sentinel value is set References: <73b04097-ef36-b597-4f7c-2e73c6eb9fa3@linaro.org> <877eq6ppkw.fsf@linux-m68k.org> X-Yow: Sometimes a TABOO is just a good CIGAR -- or a rare STEAK -- or a dry MARTINI! Date: Thu, 22 Mar 2018 17:35:00 -0000 In-Reply-To: (Jesse Hathaway's message of "Wed, 21 Mar 2018 16:27:56 -0500") Message-ID: <87370s9fns.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-03/txt/msg00518.txt.bz2 On Mär 21 2018, Jesse Hathaway wrote: > + /* If there is no login uid, linux sets /proc/self/loginid to the sentinel > + value of, (uid_t) - 1, so check if that value is set and return early to > + avoid making unneeded nss lookups. */ > + if (uid == (uid_t) - 1) No space after unary operator. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."