⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 144020 in webkit


Ignore:
Timestamp:
Feb 26, 2013, 12:49:28 AM (14 years ago)
Author:
oliver@apple.com
Message:

Appease static analyzer warning about null string passed to strlen
https://bugs.webkit.org/show_bug.cgi?id=110658

Reviewed by Benjamin Poulain.

Add a null check before calling strlen

  • wtf/Threading.cpp:

(WTF::createThread):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r144001 r144020  
     12013-02-26  Oliver Hunt  <oliver@apple.com>
     2
     3        Appease static analyzer warning about null string passed to strlen
     4        https://bugs.webkit.org/show_bug.cgi?id=110658
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Add a null check before calling strlen
     9
     10        * wtf/Threading.cpp:
     11        (WTF::createThread):
     12
    1132013-02-25  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WTF/wtf/Threading.cpp

    r111778 r144020  
    7575    // be truncated silently, but we'd like callers to know about the limit.
    7676#if !LOG_DISABLED
    77     if (strlen(name) > 31)
     77    if (name && strlen(name) > 31)
    7878        LOG_ERROR("Thread name \"%s\" is longer than 31 characters and will be truncated by Visual Studio", name);
    7979#endif
Note: See TracChangeset for help on using the changeset viewer.