Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
mock-strlen.c File Reference

(/usr/bin/git 2025-08-01, commit: e46fc091)

Implementation of a mock function for strlen(). More...

#include "mock-strlen.h"
#include "unit_test.h"
Include dependency graph for mock-strlen.c:

Functions

size_t __wrap_strlen (const char *s)
 

Variables

bool crinitMockStrlenEnabled = false
 

Detailed Description

Implementation of a mock function for strlen().

Function Documentation

◆ __wrap_strlen()

size_t __wrap_strlen ( const char *  s)

Mock function for strlen().

If crinitMockStrlenEnabled is true then it checks that the right parameters are given and returns a preset value. If crinitMockStrlenEnabled is false then the call is forwarded to the genuine strlen method.

Variable Documentation

◆ crinitMockStrlenEnabled

bool crinitMockStrlenEnabled = false