MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / remove_opened_amp

Function remove_opened_amp

src/amplifier.c:106–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105
106static int remove_opened_amp(const AMP *amp)
107{
108 struct opened_amp_l *p, *q;
109 q = NULL;
110
111 for (p = opened_amp_list; p; p = p->next)
112 {
113 if (p->amp == amp)
114 {
115 if (q == NULL)
116 {
117 opened_amp_list = opened_amp_list->next;
118 }
119 else
120 {
121 q->next = p->next;
122 }
123
124 free(p);
125 return RIG_OK;
126 }
127
128 q = p;
129 }
130
131 return -RIG_EINVAL; /* Not found in list ! */
132}
133
134
135#ifdef XXREMOVEDXX

Callers 1

amp_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected