]> git.alsa-project.org Git - tinycompress.git/commitdiff
crecord: Fix some minor coding style problems
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Wed, 18 Jan 2017 16:29:53 +0000 (16:29 +0000)
committerVinod Koul <vinod.koul@intel.com>
Wed, 18 Jan 2017 16:49:39 +0000 (22:19 +0530)
- 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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
src/utils/crecord.c

index 1ba54d70e89c730dc698935a8cd2a5a2c2a1aea7..390fe45754739181456e3c7aab6552a7b0520884 100644 (file)
@@ -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);
 }
-