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

Function check_section_header

tools/nxstyle.c:1117–1141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115 ********************************************************************************/
1116
1117static bool check_section_header(const char *line, int lineno)
1118{
1119 int i;
1120
1121 /* Search g_section_info[] to find a matching section header line */
1122
1123 for (i = FIRST_SECTION; i <= LAST_SECTION; i++)
1124 {
1125 if (strcmp(line, g_section_info[i].name) == 0)
1126 {
1127 g_section = (enum section_s)i;
1128
1129 /* Verify that this section is appropriate for this file type */
1130
1131 if ((g_file_type & g_section_info[i].ftype) == 0)
1132 {
1133 ERROR("Invalid section for this file type", lineno, 3);
1134 }
1135
1136 return true;
1137 }
1138 }
1139
1140 return false;
1141}
1142
1143/********************************************************************************
1144 * Name: white_file_list

Callers 1

mainFunction · 0.85

Calls 1

strcmpFunction · 0.50

Tested by

no test coverage detected