Skip to content

Commit 5c26996

Browse files
committed
astyle files in preparation for release 4.6
1 parent 7f8f7a0 commit 5c26996

File tree

174 files changed

+2646
-1893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+2646
-1893
lines changed

amplifiers/elecraft/kpa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int kpa_init(AMP *amp)
6767
}
6868

6969
AMPSTATE(amp)->priv = (struct kpa_priv_data *)
70-
calloc(1, sizeof(struct kpa_priv_data));
70+
calloc(1, sizeof(struct kpa_priv_data));
7171

7272
if (!AMPSTATE(amp)->priv)
7373
{

amplifiers/expert/expert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int expert_init(AMP *amp)
6969
}
7070

7171
AMPSTATE(amp)->priv = (struct expert_priv_data *)
72-
calloc(1, sizeof(struct expert_priv_data));
72+
calloc(1, sizeof(struct expert_priv_data));
7373

7474
if (!AMPSTATE(amp)->priv)
7575
{

amplifiers/gemini/gemini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int gemini_init(AMP *amp)
4646
}
4747

4848
AMPSTATE(amp)->priv = (struct gemini_priv_data *)
49-
calloc(1, sizeof(struct gemini_priv_data));
49+
calloc(1, sizeof(struct gemini_priv_data));
5050

5151
if (!AMPSTATE(amp)->priv)
5252
{

rigs/barrett/4100.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ static int barrett4100_open(RIG *rig)
110110
ENTERFUNC;
111111
retval = barrett_transaction2(rig, "M:REMOTE SENTER2,1", 3, &response);
112112

113-
rig_debug(RIG_DEBUG_ERR, "%s: back from REMOTE SENTER2: got %d\n", __func__, retval);
113+
rig_debug(RIG_DEBUG_ERR, "%s: back from REMOTE SENTER2: got %d\n", __func__,
114+
retval);
115+
114116
if (response[0] != 's')
115117
{
116118
rig_debug(RIG_DEBUG_ERR, "%s: REMOTE SENTER2 error: got %s\n", __func__,
@@ -159,6 +161,7 @@ int barrett4100_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
159161
rig_debug(RIG_DEBUG_ERR, "%s: unable to parse s gRF\n", __func__);
160162
}
161163
}
164+
162165
retval = barrett_transaction2(rig, "M:FF STF%.0f GTF", freq, &response);
163166

164167
if (retval != RIG_OK)
@@ -196,10 +199,12 @@ int barrett4100_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
196199
else
197200
{
198201
int n = sscanf(response, "gRF%lf", freq);
202+
199203
//int n = sscanf(response, "gRFA1,%*d,%lf,%*d", freq);
200204
if (n != 1)
201205
{
202-
rig_debug(RIG_DEBUG_ERR, "%s(%d): unable to parse freq from '%s'\n", __func__, __LINE__, response);
206+
rig_debug(RIG_DEBUG_ERR, "%s(%d): unable to parse freq from '%s'\n", __func__,
207+
__LINE__, response);
203208
return -RIG_EPROTO;
204209
}
205210
}

rigs/barrett/barrett.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,33 @@ int barrett_transaction2(RIG *rig, char *cmd, int expected, char **result)
7474
SNPRINTF(cmd_buf, sizeof(cmd_buf), "%c%s%s", 0x0a, cmd, EOM);
7575
barrett_flush(rig);
7676
retval = write_block(rp, (unsigned char *) cmd_buf, strlen(cmd_buf));
77+
7778
if (retval < 0)
7879
{
7980
rig_debug(RIG_DEBUG_ERR, "%s(%d): error in write_block\n", __func__, __LINE__);
8081
return retval;
8182
}
83+
8284
retval = read_block(RIGPORT(rig), (unsigned char *) priv->ret_data, expected);
8385

8486
if (retval < 0)
8587
{
8688
rig_debug(RIG_DEBUG_ERR, "%s(%d): error in read_block\n", __func__, __LINE__);
8789
return retval;
8890
}
89-
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): %d bytes read\n", __func__, __LINE__, retval);
90-
if (priv->ret_data[0] == 0x13) // we'll return from the 1st good char
91-
{
92-
*result = &(priv->ret_data[1]);
93-
}
94-
else // some commands like IAL don't give XOFF but XON is there -- is this a bug?
95-
{
96-
*result = &(priv->ret_data[0]);
97-
}
91+
92+
rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): %d bytes read\n", __func__, __LINE__,
93+
retval);
94+
95+
if (priv->ret_data[0] == 0x13) // we'll return from the 1st good char
96+
{
97+
*result = &(priv->ret_data[1]);
98+
}
99+
else // some commands like IAL don't give XOFF but XON is there -- is this a bug?
100+
{
101+
*result = &(priv->ret_data[0]);
102+
}
103+
98104
return retval;
99105
}
100106

@@ -227,7 +233,7 @@ int barrett_init(RIG *rig)
227233
rig->caps->version);
228234
// cppcheck claims leak here but it's freed in cleanup
229235
STATE(rig)->priv = (struct barrett_priv_data *)calloc(1,
230-
sizeof(struct barrett_priv_data));
236+
sizeof(struct barrett_priv_data));
231237

232238
if (!STATE(rig)->priv)
233239
{

rigs/codan/codan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ int codan_init(RIG *rig)
138138
rig->caps->version);
139139
// cppcheck claims leak here but it's freed in cleanup
140140
STATE(rig)->priv = (struct codan_priv_data *)calloc(1,
141-
sizeof(struct codan_priv_data));
141+
sizeof(struct codan_priv_data));
142142

143143
if (!STATE(rig)->priv)
144144
{

0 commit comments

Comments
 (0)