Fix strcpy_chk and stpcpy_chk performance.
[platform/upstream/glibc.git] / debug / wcstombs_chk.c
index 2de1d9f..30ed7e2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
 size_t
 __wcstombs_chk (char *dst, const wchar_t *src, size_t len, size_t dstlen)
 {
-  if (__builtin_expect (dstlen < len, 0))
+  if (__glibc_unlikely (dstlen < len))
     __chk_fail ();
 
   mbstate_t state;