summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/cache/ftccache.c
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-20 01:01:00 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-20 09:51:12 +0100
commit035f934d7a798e97bf0213a5d42a3d511132f03d (patch)
tree89aa6efdc86864ce479cddca6b9c4ba523c2754a /src/3rdparty/freetype/src/cache/ftccache.c
parentf4cc23cffbe3005f0a522cac938695e87ecd6407 (diff)
parentda4ab444ffac37514435364d4d3f0ad59d4f9bc3 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp Added tests/auto/testlib/selftests/expected_crashes_5.txt to work round the output of the crashes test (which exercises UB, see QTBUG-73903) being truncated on one test platform. Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
Diffstat (limited to 'src/3rdparty/freetype/src/cache/ftccache.c')
-rw-r--r--src/3rdparty/freetype/src/cache/ftccache.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/3rdparty/freetype/src/cache/ftccache.c b/src/3rdparty/freetype/src/cache/ftccache.c
index d8c5b99681..12ec585a25 100644
--- a/src/3rdparty/freetype/src/cache/ftccache.c
+++ b/src/3rdparty/freetype/src/cache/ftccache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2015 by */
+/* Copyright 2000-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -85,7 +85,7 @@
/* get a top bucket for specified hash from cache,
- * body for FTC_NODE__TOP_FOR_HASH( cache, hash )
+ * body for FTC_NODE_TOP_FOR_HASH( cache, hash )
*/
FT_LOCAL_DEF( FTC_Node* )
ftc_get_top_node_for_hash( FTC_Cache cache,
@@ -147,7 +147,7 @@
for (;;)
{
node = *pnode;
- if ( node == NULL )
+ if ( !node )
break;
if ( node->hash & ( mask + 1 ) )
@@ -224,7 +224,7 @@
ftc_node_hash_unlink( FTC_Node node0,
FTC_Cache cache )
{
- FTC_Node *pnode = FTC_NODE__TOP_FOR_HASH( cache, node0->hash );
+ FTC_Node *pnode = FTC_NODE_TOP_FOR_HASH( cache, node0->hash );
for (;;)
@@ -232,7 +232,7 @@
FTC_Node node = *pnode;
- if ( node == NULL )
+ if ( !node )
{
FT_TRACE0(( "ftc_node_hash_unlink: unknown node\n" ));
return;
@@ -257,7 +257,7 @@
ftc_node_hash_link( FTC_Node node,
FTC_Cache cache )
{
- FTC_Node *pnode = FTC_NODE__TOP_FOR_HASH( cache, node->hash );
+ FTC_Node *pnode = FTC_NODE_TOP_FOR_HASH( cache, node->hash );
node->link = *pnode;
@@ -288,7 +288,7 @@
cache = manager->caches[node->cache_index];
#ifdef FT_DEBUG_ERROR
- if ( cache == NULL )
+ if ( !cache )
{
FT_TRACE0(( "ftc_node_destroy: invalid node handle\n" ));
return;
@@ -494,18 +494,18 @@
FTC_Node_CompareFunc compare = cache->clazz.node_compare;
- if ( cache == NULL || anode == NULL )
+ if ( !cache || !anode )
return FT_THROW( Invalid_Argument );
/* Go to the `top' node of the list sharing same masked hash */
- bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );
+ bucket = pnode = FTC_NODE_TOP_FOR_HASH( cache, hash );
/* Lookup a node with exactly same hash and queried properties. */
/* NOTE: _nodcomp() may change the linked list to reduce memory. */
for (;;)
{
node = *pnode;
- if ( node == NULL )
+ if ( !node )
goto NewNode;
if ( node->hash == hash &&
@@ -518,12 +518,12 @@
if ( list_changed )
{
/* Update bucket by modified linked list */
- bucket = pnode = FTC_NODE__TOP_FOR_HASH( cache, hash );
+ bucket = pnode = FTC_NODE_TOP_FOR_HASH( cache, hash );
/* Update pnode by modified linked list */
while ( *pnode != node )
{
- if ( *pnode == NULL )
+ if ( !*pnode )
{
FT_ERROR(( "FTC_Cache_Lookup: oops!!! node missing\n" ));
goto NewNode;
@@ -576,13 +576,13 @@
FTC_Node* pnode = bucket;
- for ( ;; )
+ for (;;)
{
FTC_Node node = *pnode;
FT_Bool list_changed = FALSE;
- if ( node == NULL )
+ if ( !node )
break;
if ( cache->clazz.node_remove_faceid( node, face_id,