MCPcopy Create free account
hub / github.com/apache/cloudberry / ini_section_exist

Function ini_section_exist

gpcontrib/gpcloud/lib/ini.cpp:315–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315bool ini_section_exist(ini_t *ini, const char *section) {
316 char *p = ini->data;
317 while (p < ini->end) {
318 if (*p == '[') {
319 /* Handle section */
320 char* current_section = p + 1;
321 if (!section || !strcmpci(section, current_section)) {
322 return true;
323 }
324 }
325 p = next(ini, p);
326 }
327
328 return false;
329}
330
331const char* ini_get(ini_t *ini, const char *section, const char *key) {
332 const char *current_section = "";

Callers 1

SectionExistMethod · 0.85

Calls 2

strcmpciFunction · 0.85
nextFunction · 0.70

Tested by

no test coverage detected