Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_string.c Create Date:2022-07-28 06:25:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:strchr_selftest

Proto:static __init int strchr_selftest(void)

Type:int

Parameter:Nothing

117  test_string = "abcdefghijkl"
118  empty_string = ""
122  When i < strlen(test_string) + 1 cycle
123  result = strchr(test_string, test_string[i])
124  If result - test_string != i Then Return i + 'a'
128  result = strchr(empty_string, '\0')
129  If result != empty_string Then Return 0x101
132  result = strchr(empty_string, 'a')
133  If result Then Return 0x102
136  result = strchr(test_string, 'z')
137  If result Then Return 0x103
140  Return 0
Caller
NameDescribe
string_selftest_init