From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by sourceware.org (Postfix) with ESMTPS id AFB093888C78 for ; Mon, 9 May 2022 13:22:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AFB093888C78 Received: by mail-oi1-x22a.google.com with SMTP id y63so15091467oia.7 for ; Mon, 09 May 2022 06:22:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=UVdJEktqzjBrZJmItJwJ7q2Cl1uRh68lI9b9TIV+PLg=; b=KgSjmRl4ppUCmOkG0jTGP9FUr/UpqzSDDs/zoQuHMLZNlRkDKkWhDw/4WRpVNIrk93 TS8S2dXlKZBfEZalpq9X9bIiEIzQv1sTL+mwQ8ZPyKnKT7snN+Ccx/TnqagY1g9rzUqo tb+Ye+sU6yRN5MkAiGwK8yoRQctw5Y0NlGtRLAcU2rcR12oQYcxUnBVc1ePaFrP67tuI 9V3SQe+HLZ7+O9S9XmevHpGCiww8PttiNl89C/MEm0O9prObqWAN+XtK/bJaOysJndrV mTueYtg3h0ReYUOWeyaQmThhKhA3obPmf7f7JtAQQB1s//COgUPBO3N2yExORhpYekYq w0vg== X-Gm-Message-State: AOAM531lKYEi//Tj8Z5mKT6Sx5oXj3GQe6A/f8MquqUCurVQpEQj8l4V MhOpCNIA3abRTBg8SH4gJSNyhseQ7czHVg== X-Google-Smtp-Source: ABdhPJwQw3qhRyDlzH4vguxLtn73jh2VyMX8MPEh3YukSduruLbA/ht7vCWlyfAi5xxl/UzEg80JAw== X-Received: by 2002:aca:2814:0:b0:325:b405:808e with SMTP id 20-20020aca2814000000b00325b405808emr7546526oix.89.1652102557674; Mon, 09 May 2022 06:22:37 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:5fbd:82eb:6a4d:6bc4:fb11? ([2804:431:c7ca:5fbd:82eb:6a4d:6bc4:fb11]) by smtp.gmail.com with ESMTPSA id v1-20020a9d7d01000000b0060603221258sm4690754otn.40.2022.05.09.06.22.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 May 2022 06:22:37 -0700 (PDT) Message-ID: <1eba6382-8db1-d269-2ed1-a2c408e5be33@linaro.org> Date: Mon, 9 May 2022 10:22:35 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2] wcrtomb: Make behavior POSIX compliant Content-Language: en-US To: libc-alpha@sourceware.org References: <20220505184348.3357550-3-siddhesh@sourceware.org> <20220506140415.1275807-1-siddhesh@sourceware.org> From: Adhemerval Zanella In-Reply-To: <20220506140415.1275807-1-siddhesh@sourceware.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2022 13:22:40 -0000 On 06/05/2022 11:04, Siddhesh Poyarekar via Libc-alpha wrote: > + > + if (__glibc_likely (result < 2)) > + *s = *buf; > + else if (__glibc_likely (result == 2)) > + memcpy (s, buf, result); /* Help the compiler. */ > + else > + memcpy (s, buf, result); > + } > + } I am not following how this help the compiler here, it just duplicates the same memcpy call.