Skip to content

Commit 85102e4

Browse files
InterLinked1jcolp
authored andcommitted
general: Very minor coding guideline fixes.
Fixes a few coding guideline violations: * Use of C99 comments * Opening brace on same line as function prototype ASTERISK-30163 #close Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7
1 parent 9f4db77 commit 85102e4

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

apps/app_mp3.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd)
101101
/* Execute mpg123, but buffer if it's a net connection */
102102
if (!strncasecmp(filename, "http://", 7) && strstr(filename, ".m3u")) {
103103
char buffer_size_str[8];
104-
snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); // 0.5 seconds for a live stream
104+
snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); /* 0.5 seconds for a live stream */
105105
/* Most commonly installed in /usr/local/bin */
106106
execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
107107
/* But many places has it in /usr/bin */
@@ -111,7 +111,7 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd)
111111
}
112112
else if (!strncasecmp(filename, "http://", 7)) {
113113
char buffer_size_str[8];
114-
snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); // 6 seconds for a remote MP3 file
114+
snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); /* 6 seconds for a remote MP3 file */
115115
/* Most commonly installed in /usr/local/bin */
116116
execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
117117
/* But many places has it in /usr/bin */

include/asterisk/strings.h

-1
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,6 @@ static force_inline char *ast_str_to_upper(char *str)
13701370
* \return AO2 container for strings
13711371
* \retval NULL if allocation failed
13721372
*/
1373-
//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets);
13741373
struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets);
13751374

13761375
/*!

main/channel_internal_api.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,8 @@ struct ast_flags *ast_channel_flags(struct ast_channel *chan)
12831283
return &chan->flags;
12841284
}
12851285

1286-
static int collect_names_cb(void *obj, void *arg, int flags) {
1286+
static int collect_names_cb(void *obj, void *arg, int flags)
1287+
{
12871288
struct ast_control_pvt_cause_code *cause_code = obj;
12881289
struct ast_str **str = arg;
12891290

main/strings.c

-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ static int str_cmp(void *lhs, void *rhs, int flags)
197197
return cmp ? 0 : CMP_MATCH;
198198
}
199199

200-
//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets)
201200
struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets)
202201
{
203202
return ao2_container_alloc_hash(opts, 0, buckets, str_hash, str_sort, str_cmp);

0 commit comments

Comments
 (0)