MCPcopy Create free account
hub / github.com/corosync/corosync / nullcheck_strcmp

Function nullcheck_strcmp

exec/cfg.c:592–603  ·  view source on GitHub ↗

strcmp replacement that can handle NULLs */

Source from the content-addressed store, hash-verified

590
591/* strcmp replacement that can handle NULLs */
592static int nullcheck_strcmp(const char* left, const char *right)
593{
594 if (!left && right)
595 return -1;
596 if (left && !right)
597 return 1;
598
599 if (!left && !right)
600 return 0;
601
602 return strcmp(left, right);
603}
604
605/*
606 * If a key has changed value in the new file, then warn the user and remove it from the temp_map

Callers 1

remove_deleted_entriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected