aboutsummaryrefslogtreecommitdiff
path: root/src/name_table.c
diff options
context:
space:
mode:
authorShinya Sato <shinnya.sato@gmail.com>2023-05-07 21:36:00 +0900
committerShinya Sato <shinnya.sato@gmail.com>2023-05-07 21:36:00 +0900
commit6b97d6abff5dcd5142bd3982b4ad60fdb7d0804c (patch)
tree3bda6cc2480f73518e436416fa811558902be397 /src/name_table.c
parent9f65b32712aa79fbf26ff3a298877ea99a6740eb (diff)
downloadinpla-6b97d6abff5dcd5142bd3982b4ad60fdb7d0804c.tar.gz
inpla-6b97d6abff5dcd5142bd3982b4ad60fdb7d0804c.zip
v0.10.8-1
Diffstat (limited to 'src/name_table.c')
-rw-r--r--src/name_table.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/name_table.c b/src/name_table.c
index 06ff955..efe1fe0 100644
--- a/src/name_table.c
+++ b/src/name_table.c
@@ -117,11 +117,10 @@ IDTYPE NameTable_get_set_id_with_IdTable_forAgent(char *key) {
int hash;
NameList *add;
-
hash = getHash(key);
if (NameHashTable[hash] == NULL) {
-
+
add = NameList_new();
add->name = key;
add->id = IdTable_new_agentid();
@@ -134,9 +133,8 @@ IDTYPE NameTable_get_set_id_with_IdTable_forAgent(char *key) {
NameList *at = NameHashTable[hash];
while (at != NULL) {
- if (strcmp(at->name, key) == 0) {
- return (at->id);
-
+ if (strcmp(at->name, key) == 0) {
+ return (at->id);
}
at = at->next;
}