|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH] linux-user: Allow getdents to be provided by getdents64 |
Date: | Mon, 03 Jun 2013 08:58:41 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
On 06/03/2013 08:45 AM, Peter Maydell wrote: >>> >> + /* The target_dirent type is in what was formerly a >>> >> padding >>> >> + * byte at the end of the structure: >>> >> + */ >>> >> + *(((char *)tde) + treclen - 1) = type; >> > >> > Maybe easier to read as >> > >> > ((char *)tde)[treclen - 1] = type >> > >> > ? > Dunno. It's not actually a char array, so I kind of prefer > to use plain pointer arithmetic for this kind of thing. Then drop the unnecessary parenthesis *((char *)tde + trelen - 1) = type; ? r~
[Prev in Thread] | Current Thread | [Next in Thread] |