ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] select patch


From: Bernhard R. Link
Subject: Re: [RP] select patch
Date: Thu, 19 Jun 2014 15:47:33 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

* Jeff Abrahamson <address@hidden> [140618 20:52]:
>    - Using raw strcmp() isn't a very good idea -- if one of the strings is
>    not null-terminated, you introduce a subtle bug.  Prefer instead strncmp()
>    and strnlen().  This requires defining some reasonable upper limit on
>    window names, of course.

I have to disagree quite vehemently here. Either things are
null-terminated or they are not.
If they are then introducing a limit where there is not can only
produce bugs (subtle and non-subtle).
If they are not then most of the time things starting with str* are
usually the wrong tools anyway.

        Bernhard R. Link
-- 
F8AC 04D5 0B9B 064B 3383  C3DA AFFC 96D1 151D FFDC



reply via email to

[Prev in Thread] Current Thread [Next in Thread]