MCPcopy Create free account
hub / github.com/apache/nuttx / check_variable

Function check_variable

tools/initialconfig.c:314–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312 ****************************************************************************/
313
314static bool check_variable(const char *configpath, const char *varname,
315 const char *varvalue)
316{
317 char *tmpvalue;
318
319 if (find_variable(configpath, varname, &tmpvalue))
320 {
321 /* The variable name exists. Does it have a value? Does the value
322 * match varvalue?
323 */
324
325 if (tmpvalue != NULL && strcmp(varvalue, tmpvalue) == 0)
326 {
327 /* Yes.. return success */
328
329 return true;
330 }
331 }
332
333 /* Return failure */
334
335 return false;
336}
337
338/****************************************************************************
339 * Name: test_filepath

Callers 1

Calls 2

find_variableFunction · 0.70
strcmpFunction · 0.50

Tested by

no test coverage detected