MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / crm_parse_int

Function crm_parse_int

lib/common/utils.c:538–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538int
539crm_parse_int(const char *text, const char *default_text)
540{
541 int atoi_result = -1;
542
543 if (text != NULL) {
544 atoi_result = crm_int_helper(text, NULL);
545 if (errno == 0) {
546 return atoi_result;
547 }
548 }
549
550 if (default_text != NULL) {
551 atoi_result = crm_int_helper(default_text, NULL);
552 if (errno == 0) {
553 return atoi_result;
554 }
555
556 } else {
557 crm_err("No default conversion value supplied");
558 }
559
560 return -1;
561}
562
563gboolean
564safe_str_neq(const char *a, const char *b)

Callers 15

list_resource_operationsFunction · 0.85
print_ticketFunction · 0.85
print_rsc_historyFunction · 0.85
print_attr_msgFunction · 0.85
print_statusFunction · 0.85
exec_rsc_actionFunction · 0.85
create_action_nameFunction · 0.85
mainFunction · 0.85
cib_GCompareFuncFunction · 0.85
mainFunction · 0.85
startCibFunction · 0.85
cib_compare_generationFunction · 0.85

Calls 1

crm_int_helperFunction · 0.85

Tested by 1

test_attr_expressionFunction · 0.68