提交 178d2e4c 编写于 作者: F fangting

codecheck问题整改

Signed-off-by: Nfangting <fangting12@huawei.com>
上级 9eab551a
#include <stdlib.h> #include <stdlib.h>
#include "test.h" #include "test.h"
__attribute__((constructor)) __attribute__((constructor))
void B_ctor() { void Ctor()
exit(t_status); {
} exit(t_status);
int main() { int main()
return t_status; {
return t_status;
} }
\ No newline at end of file
// from openbsd, will be rectified later // from openbsd, will be rectified later
#include <string.h> #include <string.h>
size_t strcspn(const char *string1, const char *string2) size_t strcspn(const char *string1, const char *string2)
{ {
const char *a, *p; const char *a, *p;
char sc, c; char sc, c;
for (a = string1;;) { for (a = string1;;) {
sc = *a++; sc = *a++;
p = string2; p = string2;
do { do {
if ((c = *p++) == sc) if ((c = *p++) == sc) {
return (a - 1 - string1); return (a - 1 - string1);
} while (c != 0); }
} } while (c != 0);
}
/* NOTREACHED */ /* NOTREACHED */
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册