[PATCH 1/2] crecord: Fix some minor coding style problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- 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@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux