lkml.org 
[lkml]   [2013]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2] (Was: perf_event_mmap(vma) && !vma->vm_mm)
On 10/17, Oleg Nesterov wrote:
>
> - we do not really need "len", we can simply do
>
> size = strlen(name) + 1;
> while (size % sizeof(u64))
> name[size++] = '\0';
>
> although I won't argue if you dislike "size & 7" in while().

Or, perhaps,

while (!IS_ALIGNED(size, sizeof(u64)))
name[size++] = '\0';

to make it self-explanatory.

Oleg.



\
 
 \ /
  Last update: 2013-10-17 18:01    [W:1.355 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site