]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
general: Very minor coding guideline fixes.
authorNaveen Albert <asterisk@phreaknet.org>
Thu, 28 Jul 2022 21:12:09 +0000 (21:12 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 17 Aug 2022 16:04:55 +0000 (11:04 -0500)
Fixes a few coding guideline violations:
* Use of C99 comments
* Opening brace on same line as function prototype

ASTERISK-30163 #close

Change-Id: I07771c4c89facd41ce8d323859f022ddbddf6ca7

apps/app_mp3.c
include/asterisk/strings.h
main/channel_internal_api.c
main/strings.c

index 9bc23c0477a1f95fb29f813d0d49eb88f1420947..ef342b30cc38a0d12221b9b13e5590d402687eb9 100644 (file)
@@ -101,7 +101,7 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd)
        /* Execute mpg123, but buffer if it's a net connection */
        if (!strncasecmp(filename, "http://", 7) && strstr(filename, ".m3u")) {
            char buffer_size_str[8];
-           snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); // 0.5 seconds for a live stream
+           snprintf(buffer_size_str, 8, "%u", (int) 0.5*2*sampling_rate/1000); /* 0.5 seconds for a live stream */
                /* Most commonly installed in /usr/local/bin */
            execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, "-@", filename, (char *)NULL);
                /* But many places has it in /usr/bin */
@@ -111,7 +111,7 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd)
        }
        else if (!strncasecmp(filename, "http://", 7)) {
            char buffer_size_str[8];
-           snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); // 6 seconds for a remote MP3 file
+           snprintf(buffer_size_str, 8, "%u", 6*2*sampling_rate/1000); /* 6 seconds for a remote MP3 file */
                /* Most commonly installed in /usr/local/bin */
            execl(LOCAL_MPG_123, "mpg123", "-e", "s16", "-q", "-s", "-b", buffer_size_str, "-f", "8192", "--mono", "-r", sampling_rate_str, filename, (char *)NULL);
                /* But many places has it in /usr/bin */
index d2c3c82ac8bc5b5ebeebe4f9b70aaa7877e15db1..d0a4cbb02afa4078117a3dd50d6f7f74b945d5f8 100644 (file)
@@ -1370,7 +1370,6 @@ static force_inline char *ast_str_to_upper(char *str)
  * \return AO2 container for strings
  * \retval NULL if allocation failed
  */
-//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets);
 struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets);
 
 /*!
index 123f61aebd248861d2c3217e5c7f08d2f2313954..bc0fb4c6417dcf9bd95a84e91841e9019781e3e0 100644 (file)
@@ -1283,7 +1283,8 @@ struct ast_flags *ast_channel_flags(struct ast_channel *chan)
        return &chan->flags;
 }
 
-static int collect_names_cb(void *obj, void *arg, int flags) {
+static int collect_names_cb(void *obj, void *arg, int flags)
+{
        struct ast_control_pvt_cause_code *cause_code = obj;
        struct ast_str **str = arg;
 
index 20769fae1133f1b2b4c48d29068d2699f77ab137..d40eed6a6c9892449ba1ae72696ecb7968c0a6a1 100644 (file)
@@ -197,7 +197,6 @@ static int str_cmp(void *lhs, void *rhs, int flags)
        return cmp ? 0 : CMP_MATCH;
 }
 
-//struct ao2_container *ast_str_container_alloc_options(enum ao2_container_opts opts, int buckets)
 struct ao2_container *ast_str_container_alloc_options(enum ao2_alloc_opts opts, int buckets)
 {
        return ao2_container_alloc_hash(opts, 0, buckets, str_hash, str_sort, str_cmp);