summaryrefslogtreecommitdiffstats
path: root/source/xrmoptions.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-03-19 13:29:04 +0100
committerDave Davenport <qball@gmpclient.org>2016-03-19 13:29:04 +0100
commita2869ef39d1e78c70877df27dc9a6ebc66962842 (patch)
tree98715f56cd4792a9c8b68a9933765a113fd37d41 /source/xrmoptions.c
parent1f8db0fc5a1da29346119937da5fe559469af2bc (diff)
Make clang static code analyzer happy (300+ -> 5)
Diffstat (limited to 'source/xrmoptions.c')
-rw-r--r--source/xrmoptions.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/xrmoptions.c b/source/xrmoptions.c
index 07486d4e..021f4198 100644
--- a/source/xrmoptions.c
+++ b/source/xrmoptions.c
@@ -523,13 +523,15 @@ void config_parse_xresources_theme_dump ( void )
printf ( "! ROFI Color theme\n" );
printf ( "! User: %s\n", g_get_user_name () );
printf ( "! ------------------------------------------------------------------------------\n" );
- const char * namePrefix = "rofi";
+ const char * const namePrefix = "rofi";
+ const char colorPrefix[] = "color-";
+ const char separatorStyle[] = "separator-style";
unsigned int entries = sizeof ( xrmOptions ) / sizeof ( *xrmOptions );
for ( unsigned int i = 0; i < entries; ++i ) {
- if ( strncmp ( xrmOptions[i].name, "color-", 6 ) == 0 ) {
+ if ( strncmp ( xrmOptions[i].name, colorPrefix, sizeof(colorPrefix)-1 ) == 0 ) {
xresource_dump_entry ( namePrefix, &xrmOptions[i] );
}
- else if ( strcmp ( xrmOptions[i].name, "separator-style" ) == 0 ) {
+ else if ( strcmp ( xrmOptions[i].name, separatorStyle ) == 0 ) {
xresource_dump_entry ( namePrefix, &xrmOptions[i] );
}
}