Browse Source

Improve 'if' readability

Abdullah ibn Nadjo 7 years ago
parent
commit
6aea2b15bf
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/light.c

+ 5
- 1
src/light.c View File

227
 LIGHT_BOOL light_initialize(int argc, char** argv)
227
 LIGHT_BOOL light_initialize(int argc, char** argv)
228
 {
228
 {
229
   int mkdirVal;
229
   int mkdirVal;
230
+  LIGHT_OP_MODE mode;
230
 
231
 
231
   light_defaultConfig();
232
   light_defaultConfig();
232
   if(!light_parseArguments(argc, argv))
233
   if(!light_parseArguments(argc, argv))
234
     LIGHT_ERR("could not parse arguments");
235
     LIGHT_ERR("could not parse arguments");
235
     return FALSE;
236
     return FALSE;
236
   }
237
   }
238
+  mode = light_Configuration.operationMode;
237
 
239
 
238
   /* Just return true for operation modes that do not need initialization */
240
   /* Just return true for operation modes that do not need initialization */
239
-  if(light_Configuration.operationMode == LIGHT_PRINT_HELP || light_Configuration.operationMode == LIGHT_PRINT_VERSION || light_Configuration.operationMode == LIGHT_LIST_CTRL)
241
+  if(mode == LIGHT_PRINT_HELP ||
242
+     mode == LIGHT_PRINT_VERSION ||
243
+     mode == LIGHT_LIST_CTRL)
240
   {
244
   {
241
       return TRUE;
245
       return TRUE;
242
   }
246
   }