constants should be capital

This commit is contained in:
root committed 2026-08-23 18:42:16 +02:00
1 parent a122e0a096
commit 1149db2312
1 file changed
+5 -5
+5 -5
View File
@@ -25,8 +25,8 @@
#define LENGTH_SIZE ( ( size_t )9 ) #define LENGTH_SIZE ( ( size_t )9 )
// constant declarations // constant declarations
static char permission_characters[] = { 'x', 'w', 'r' }; static char PERMISSION_CHARS[] = { 'x', 'w', 'r' };
static char size_characters[] = { 'B', 'k', 'M', 'G', 'T', 'P' }; static char SIZE_CHARS[] = { 'B', 'k', 'M', 'G', 'T', 'P' };
// function prototypes // function prototypes
static int permissions_to_string( static int permissions_to_string(
@@ -204,7 +204,7 @@ int permissions_to_string(
{ {
if ( permissions & ( 1 << n ) ) if ( permissions & ( 1 << n ) )
{ {
string[ 9 - n ] = permission_characters[ n % 3 ]; string[ 9 - n ] = PERMISSION_CHARS[ n % 3 ];
} }
else else
{ {
@@ -427,11 +427,11 @@ void size_to_string(
if ( entry->stats.st_mode & S_IFREG if ( entry->stats.st_mode & S_IFREG
|| entry->stats.st_mode & S_IFCHR ) || 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 ) if ( 1000.0f > size_format )
{ {
size_quantifier = size_characters[ k ]; size_quantifier = SIZE_CHARS[ k ];
break; break;
} }
size_format /= 1000.0f; size_format /= 1000.0f;