diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-11-19 18:43:25 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-11-20 11:48:44 +0000 |
commit | cae348d95825d65319a5127f39a954bf68de9ca3 (patch) | |
tree | 3ec1ea667c6c2dab30e81a879b7303ec18b1a502 /psi | |
parent | 5e23e7e9daab8498db642fc8ac241ba7f00a157b (diff) | |
download | ghostpdl-cae348d95825d65319a5127f39a954bf68de9ca3.tar.gz |
Rejig dict_find so that gotos are all forwards.
Hopefully this will make lgtm happier.
Diffstat (limited to 'psi')
-rw-r--r-- | psi/idict.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/psi/idict.c b/psi/idict.c index b698a9fe2..e1f0318f7 100644 --- a/psi/idict.c +++ b/psi/idict.c @@ -289,13 +289,6 @@ dict_find(const ref * pdref, const ref * pkey, /* Compute hash. The only types we bother with are strings, */ /* names, and (unlikely, but worth checking for) integers. */ switch (r_type(pkey)) { - case t_name: - nidx = name_index(mem, pkey); - nh: - hash = dict_name_index_hash(nidx); - kpack = packed_name_key(nidx); - ktype = t_name; - break; case t_string: /* convert to a name first */ { ref nref; @@ -309,6 +302,13 @@ dict_find(const ref * pdref, const ref * pkey, nidx = name_index(mem, &nref); } goto nh; + case t_name: + nidx = name_index(mem, pkey); + nh: + hash = dict_name_index_hash(nidx); + kpack = packed_name_key(nidx); + ktype = t_name; + break; case t_real: /* * Make sure that equal reals and integers hash the same. |