Fix possible macro expansion problem.

As indicated by llvm analysis passes.
This commit is contained in:
Dave Davenport 2016-04-05 21:26:21 +02:00
parent 29f6823cf9
commit bf51983150
1 changed files with 2 additions and 1 deletions

View File

@ -627,7 +627,8 @@ int main ( int argc, char *argv[] )
else{
// Get the base name of the executable called.
char *base_name = g_path_get_basename ( argv[0] );
dmenu_mode = ( strcmp ( base_name, "dmenu" ) == 0 );
const char * const dmenu_str = "dmenu";
dmenu_mode = ( strcmp ( base_name, dmenu_str ) == 0 );
// Free the basename for dmenu detection.
g_free ( base_name );
}