Skip to content

Commit 62fc1f3

Browse files
committed
Allow more nameservice entries
1 parent 1f9d662 commit 62fc1f3

File tree

3 files changed

+226
-138
lines changed

3 files changed

+226
-138
lines changed

lib/nameservice/src/mapwrite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ lookup_position_latlon(union olsr_ip_addr *ip)
8383

8484
entry = list2db(list_node);
8585

86-
if (entry && entry->names && ipequal(&entry->originator, ip)) {
86+
if (entry->names && ipequal(&entry->originator, ip)) {
8787
return entry->names->name;
8888
}
8989
}
@@ -158,7 +158,7 @@ mapwrite_work(FILE * fmap)
158158

159159
entry = list2db(list_node);
160160

161-
if (entry && entry->names) {
161+
if (NULL != entry->names) {
162162
if (0 >
163163
fprintf(fmap, "Node('%s',%s,'%s','%s');\n", olsr_ip_to_string(&strbuf1, &entry->originator), entry->names->name,
164164
olsr_ip_to_string(&strbuf2, &entry->names->ip), lookup_name_latlon(&entry->originator))) {

0 commit comments

Comments
 (0)