From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: vinod.koul@intel.com
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com
Subject: [PATCH 1/2] crecord: Fix some minor coding style problems
Date: Wed, 18 Jan 2017 16:29:53 +0000 [thread overview]
Message-ID: <1484756994-19679-1-git-send-email-rf@opensource.wolfsonmicro.com> (raw)
- Incorrect indenting of arguments to capture_samples()
- Wrap long line in capture_samples()
- Added a blank line in main() for readability
- Deleted extra trailing blank line at end of file
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
src/utils/crecord.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/utils/crecord.c b/src/utils/crecord.c
index 1ba54d7..390fe45 100644
--- a/src/utils/crecord.c
+++ b/src/utils/crecord.c
@@ -237,9 +237,9 @@ static int finish_record(void)
}
static void capture_samples(char *name, unsigned int card, unsigned int device,
- unsigned long buffer_size, unsigned int frag,
- unsigned int length, unsigned int rate,
- unsigned int channels, unsigned int format)
+ unsigned long buffer_size, unsigned int frag,
+ unsigned int length, unsigned int rate,
+ unsigned int channels, unsigned int format)
{
struct compr_config config;
struct snd_codec codec;
@@ -268,7 +268,8 @@ static void capture_samples(char *name, unsigned int card, unsigned int device,
if (!name) {
file = STDOUT_FILENO;
} else {
- file = open(name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
+ file = open(name, O_RDWR | O_CREAT,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (file == -1) {
fprintf(stderr, "Unable to open file '%s'\n", name);
exit(EXIT_FAILURE);
@@ -466,6 +467,7 @@ int main(int argc, char **argv)
exit(EXIT_FAILURE);
}
}
+
if (optind >= argc) {
file = NULL;
finfo = fopen("/dev/null", "w");
@@ -483,4 +485,3 @@ int main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
-
--
1.9.1
next reply other threads:[~2017-01-18 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 16:29 Richard Fitzgerald [this message]
2017-01-18 16:29 ` [PATCH 2/2] crecord: Add option to specify codec ID Richard Fitzgerald
2017-01-18 16:52 ` [PATCH 1/2] crecord: Fix some minor coding style problems Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484756994-19679-1-git-send-email-rf@opensource.wolfsonmicro.com \
--to=rf@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.