| 263 | } |
| 264 | |
| 265 | static const char *findString(const char *contentStart, const char *contentEnd, |
| 266 | const char *string) { |
| 267 | size_t stringLength; |
| 268 | const char *currentPosition; |
| 269 | const char *found = NULL; |
| 270 | stringLength = strlen(string); |
| 271 | currentPosition = contentStart; |
| 272 | for (currentPosition = contentStart; currentPosition < contentEnd; |
| 273 | currentPosition++) { |
| 274 | if (*currentPosition == string[0]) { |
| 275 | if (currentPosition + stringLength < contentEnd) { |
| 276 | if (strncmp(currentPosition, string, stringLength) == 0) { |
| 277 | found = currentPosition; |
| 278 | break; |
| 279 | } |
| 280 | } |
| 281 | } |
| 282 | } |
| 283 | return found; |
| 284 | } |
| 285 | |
| 286 | static ds_status readProFile(const char *fileName, char **content, |
| 287 | size_t *contentSize) { |
no outgoing calls
no test coverage detected