[committed] __glibc_unsafe_len: Fix comment

Message ID 20211216015254.3940981-1-siddhesh@sourceware.org
State Committed
Commit ae23fa3e5fe24daf94fc7f8e5268bb8ceeda7477
Headers
Series [committed] __glibc_unsafe_len: Fix comment |

Commit Message

Siddhesh Poyarekar Dec. 16, 2021, 1:52 a.m. UTC
  We know that the length is *unsafe*.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
---
 misc/sys/cdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Adhemerval Zanella Netto Dec. 16, 2021, 10:24 a.m. UTC | #1
On 15/12/2021 22:52, Siddhesh Poyarekar via Libc-alpha wrote:
> We know that the length is *unsafe*.
> 
> Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

Seems obvious enough.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  misc/sys/cdefs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
> index ab57d4a065..a05b538579 100644
> --- a/misc/sys/cdefs.h
> +++ b/misc/sys/cdefs.h
> @@ -169,7 +169,7 @@
>  						   __s, __osz))		      \
>     && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
>  
> -/* Conversely, we know at compile time that the length is safe if the
> +/* Conversely, we know at compile time that the length is unsafe if the
>     __L * __S <= __OBJSZ condition can be folded to a constant and if it is
>     false.  */
>  #define __glibc_unsafe_len(__l, __s, __osz) \
  
Siddhesh Poyarekar Dec. 16, 2021, 10:44 a.m. UTC | #2
On 12/16/21 15:54, Adhemerval Zanella via Libc-alpha wrote:
> 
> 
> On 15/12/2021 22:52, Siddhesh Poyarekar via Libc-alpha wrote:
>> We know that the length is *unsafe*.
>>
>> Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
> 
> Seems obvious enough.
> 
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Oh I already committed that one as obvious, could you please review this 
one:

https://patchwork.sourceware.org/project/glibc/patch/20211216014731.3939905-1-siddhesh@sourceware.org/

Thanks,
Siddhesh
  
Adhemerval Zanella Netto Dec. 16, 2021, 11:21 a.m. UTC | #3
On 16/12/2021 07:44, Siddhesh Poyarekar wrote:
> On 12/16/21 15:54, Adhemerval Zanella via Libc-alpha wrote:
>>
>>
>> On 15/12/2021 22:52, Siddhesh Poyarekar via Libc-alpha wrote:
>>> We know that the length is *unsafe*.
>>>
>>> Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
>>
>> Seems obvious enough.
>>
>> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
> 
> Oh I already committed that one as obvious, could you please review this one:

Oops I did not see the 'committed' title.

> 
> https://patchwork.sourceware.org/project/glibc/patch/20211216014731.3939905-1-siddhesh@sourceware.org/
> 

Sure.

> Thanks,
> Siddhesh
  

Patch

diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index ab57d4a065..a05b538579 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -169,7 +169,7 @@ 
 						   __s, __osz))		      \
    && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
 
-/* Conversely, we know at compile time that the length is safe if the
+/* Conversely, we know at compile time that the length is unsafe if the
    __L * __S <= __OBJSZ condition can be folded to a constant and if it is
    false.  */
 #define __glibc_unsafe_len(__l, __s, __osz) \