summaryrefslogtreecommitdiffstats
path: root/axconfig.c
diff options
context:
space:
mode:
authorThomas Osterried <thomas@osterried.de>2009-04-09 12:33:52 +0000
committerThomas Osterried <thomas@osterried.de>2009-04-09 12:33:52 +0000
commitab92cf5d7b324c53c7a7c2ffbbb8d9b2ec18e722 (patch)
tree511c4f70f23268e6baae4d52245e9ff87e27532e /axconfig.c
parentbd9f68d02864a4e22a8403e6a208769994f41408 (diff)
small fix for the last patch
Diffstat (limited to 'axconfig.c')
-rw-r--r--axconfig.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/axconfig.c b/axconfig.c
index 2742b4e..fd48067 100644
--- a/axconfig.c
+++ b/axconfig.c
@@ -104,10 +104,11 @@ char *ax25_config_get_name(char *device)
{
AX_Port *p = ax25_ports;
- while (p != NULL && p->Device != NULL) {
- if (strcmp(p->Device, device) == 0)
- return p->Name;
-
+ while (p != NULL) {
+ if (p->Device != NULL) {
+ if (strcmp(p->Device, device) == 0)
+ return p->Name;
+ }
p = p->Next;
}
@@ -142,12 +143,14 @@ char *ax25_config_get_port(ax25_address *callsign)
if (ax25_cmp(callsign, &null_ax25_address) == 0)
return "*";
- while (p != NULL && p->Call != NULL) {
- ax25_aton_entry(p->Call, (char *)&addr);
+ while (p != NULL) {
+ if (p->Call != NULL) {
+ ax25_aton_entry(p->Call, (char *)&addr);
- if (ax25_cmp(callsign, &addr) == 0)
- return p->Name;
+ if (ax25_cmp(callsign, &addr) == 0)
+ return p->Name;
+ }
p = p->Next;
}