]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cramfs_common: coding style
authorSami Kerola <kerolasa@iki.fi>
Wed, 20 Jul 2011 19:57:11 +0000 (21:57 +0200)
committerSami Kerola <kerolasa@iki.fi>
Wed, 20 Jul 2011 20:49:48 +0000 (22:49 +0200)
Fix line lengths and white spaces.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/cramfs_common.c

index 4f679cb9b69df19e6f9806c0471ab71f1f71d8b5..c76dbd1cfca331f5affb9763fffb532b97df377f 100644 (file)
@@ -35,16 +35,17 @@ void super_toggle_endianness(int big_endian, struct cramfs_super *super)
                super->fsid.crc = swab32(super->fsid.crc);
                super->fsid.edition = swab32(super->fsid.edition);
                super->fsid.blocks = swab32(super->fsid.blocks);
-               super->fsid.files = swab32(super->fsid.files);  
+               super->fsid.files = swab32(super->fsid.files);
        }
 }
 
-void inode_toggle_endianness(int input_big_endian, int output_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out)
+void inode_toggle_endianness(int input_big_endian, int output_big_endian,
+                            struct cramfs_inode *inode_in,
+                            struct cramfs_inode *inode_out)
 {
        if (input_big_endian == output_big_endian) {
                memmove(inode_out, inode_in, sizeof(*inode_out));
-       }
-       else {
+       } else {
                unsigned char inode_out_buf[sizeof(*inode_in)];
                unsigned char *inode_in_buf = (unsigned char*)inode_in;
 
@@ -52,7 +53,7 @@ void inode_toggle_endianness(int input_big_endian, int output_big_endian, struct
                inode_out_buf[1] = inode_in_buf[0];
 
                inode_out_buf[2] = inode_in_buf[3]; /* 16 bit: uid */
-               inode_out_buf[3] = inode_in_buf[2]; 
+               inode_out_buf[3] = inode_in_buf[2];
 
                inode_out_buf[4] = inode_in_buf[6]; /* 24 bit: size */
                inode_out_buf[5] = inode_in_buf[5];
@@ -60,11 +61,12 @@ void inode_toggle_endianness(int input_big_endian, int output_big_endian, struct
 
                inode_out_buf[7] = inode_in_buf[7]; /* 8 bit: gid width */
 
-               /* Stop the madness! Outlaw C bitfields! They are unportable and nasty!
-               See for yourself what a mess this is: */
-
+               /*
+                * Stop the madness! Outlaw C bitfields! They are unportable
+                * and nasty! See for yourself what a mess this is:
+                */
                if (output_big_endian) {
-                       inode_out_buf[ 8] = ( (inode_in_buf[ 8]&0x3F) << 2 ) | 
+                       inode_out_buf[ 8] = ( (inode_in_buf[ 8]&0x3F) << 2 ) |
                                ( (inode_in_buf[11]&0xC0) >> 6 );
 
                        inode_out_buf[ 9] = ( (inode_in_buf[11]&0x3F) << 2 ) |
@@ -75,31 +77,33 @@ void inode_toggle_endianness(int input_big_endian, int output_big_endian, struct
 
                        inode_out_buf[11] = ( (inode_in_buf[ 9]&0x3F) << 2 ) |
                                ( (inode_in_buf[ 8]&0xC0) >> 6 );
-               }
-               else {
-                       inode_out_buf[ 8] = ( (inode_in_buf[ 8]&0xFD) >> 2 ) | 
+               } else {
+                       inode_out_buf[ 8] = ( (inode_in_buf[ 8]&0xFD) >> 2 ) |
                                ( (inode_in_buf[11]&0x03) << 6 );
 
-                       inode_out_buf[ 9] = ( (inode_in_buf[11]&0xFD) >> 2 ) | 
+                       inode_out_buf[ 9] = ( (inode_in_buf[11]&0xFD) >> 2 ) |
                                ( (inode_in_buf[10]&0x03) << 6 );
 
-                       inode_out_buf[10] = ( (inode_in_buf[10]&0xFD) >> 2 ) | 
+                       inode_out_buf[10] = ( (inode_in_buf[10]&0xFD) >> 2 ) |
                                ( (inode_in_buf[ 9]&0x03) << 6 );
 
-                       inode_out_buf[11] = ( (inode_in_buf[ 9]&0xFD) >> 2 ) | 
+                       inode_out_buf[11] = ( (inode_in_buf[ 9]&0xFD) >> 2 ) |
                                ( (inode_in_buf[ 8]&0x03) << 6 );
                }
-
                memmove(inode_out, inode_out_buf, sizeof(*inode_out));
        }
 }
 
-void inode_to_host(int from_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out)
+void inode_to_host(int from_big_endian, struct cramfs_inode *inode_in,
+                  struct cramfs_inode *inode_out)
 {
-       inode_toggle_endianness(from_big_endian, HOST_IS_BIG_ENDIAN, inode_in, inode_out);
+       inode_toggle_endianness(from_big_endian, HOST_IS_BIG_ENDIAN, inode_in,
+                               inode_out);
 }
 
-void inode_from_host(int to_big_endian, struct cramfs_inode *inode_in, struct cramfs_inode *inode_out)
+void inode_from_host(int to_big_endian, struct cramfs_inode *inode_in,
+                    struct cramfs_inode *inode_out)
 {
-       inode_toggle_endianness(HOST_IS_BIG_ENDIAN, to_big_endian, inode_in, inode_out);
+       inode_toggle_endianness(HOST_IS_BIG_ENDIAN, to_big_endian, inode_in,
+                               inode_out);
 }