On (02/06/08 09:56), Enno Gottox Boland wrote:
> To: dynamic window manager <dwm_AT_suckless.org>
> From: Enno Gottox Boland <gottox_AT_gmail.com>
> Subject: Re: [dwm] [patch] simplification to drawtext
> Reply-To: dynamic window manager <dwm_AT_suckless.org>
> List-Id: dynamic window manager <dwm.suckless.org>
>
> whoops...
>
> memcpy(&buf[MAX(0, len - 3)], "...", MIN(3, len));
>
Still, this is not needed, as buf is ALWAYS greater than 3 bytes. So:
memcpy(&buf[MAX(0, len - 3)], "...", 3);
is sufficent, this was my thought when I wrote this memcpy variant.
-Ph
-- Premysl "Anydot" Hruby, http://www.redrum.cz/Received on Mon Jun 02 2008 - 10:16:34 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:46:47 UTC