constants should be capital
This commit is contained in:
1 parent
a122e0a096
commit
1149db2312
1 file changed
+5
-5
+5
-5
@@ -25,8 +25,8 @@
|
||||
#define LENGTH_SIZE ( ( size_t )9 )
|
||||
|
||||
// constant declarations
|
||||
static char permission_characters[] = { 'x', 'w', 'r' };
|
||||
static char size_characters[] = { 'B', 'k', 'M', 'G', 'T', 'P' };
|
||||
static char PERMISSION_CHARS[] = { 'x', 'w', 'r' };
|
||||
static char SIZE_CHARS[] = { 'B', 'k', 'M', 'G', 'T', 'P' };
|
||||
|
||||
// function prototypes
|
||||
static int permissions_to_string(
|
||||
@@ -204,7 +204,7 @@ int permissions_to_string(
|
||||
{
|
||||
if ( permissions & ( 1 << n ) )
|
||||
{
|
||||
string[ 9 - n ] = permission_characters[ n % 3 ];
|
||||
string[ 9 - n ] = PERMISSION_CHARS[ n % 3 ];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -427,11 +427,11 @@ void size_to_string(
|
||||
if ( entry->stats.st_mode & S_IFREG
|
||||
|| entry->stats.st_mode & S_IFCHR )
|
||||
{
|
||||
for ( int k = 0; k < ( int )sizeof( size_characters ); k++ )
|
||||
for ( int k = 0; k < ( int )sizeof( SIZE_CHARS ); k++ )
|
||||
{
|
||||
if ( 1000.0f > size_format )
|
||||
{
|
||||
size_quantifier = size_characters[ k ];
|
||||
size_quantifier = SIZE_CHARS[ k ];
|
||||
break;
|
||||
}
|
||||
size_format /= 1000.0f;
|
||||
|
||||
Reference in new issue
Block a user