numparam/xpressn.c, cleanup `getidtype()'

This commit is contained in:
rlar 2015-10-11 14:21:04 +02:00
parent 813024678d
commit 76aedfae40
1 changed files with 3 additions and 5 deletions

View File

@ -394,14 +394,12 @@ char
getidtype(dico_t *dico, char *s) getidtype(dico_t *dico, char *s)
/* test if identifier s is known. Answer its type, or '?' if not in table */ /* test if identifier s is known. Answer its type, or '?' if not in table */
{ {
entry_t *entry; /* hash table entry */ entry_t *entry = entrynb(dico, s);
char itp = '?'; /* assume unknown */
entry = entrynb(dico, s);
if (entry) if (entry)
itp = entry->tp; return entry->tp;
return (itp); return '?';
} }