xstrdup.c
来自「tftp-hpa 一个功能完备开源tftp 客户端,可移植到Linux 和各个U」· C语言 代码 · 共 23 行
C
23 行
/* * xstrdup.c * * Simple error-checking version of strdup() * */#include <stdlib.h>#include <string.h>#include <stdio.h>char *xstrdup(const char *s){ char *p = strdup(s); if ( !p ) { fprintf(stderr, "Out of memory!\n"); exit(128); } return p;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?