fopen code
来源:互联网 发布:获取网站源码工具 编辑:程序博客网 时间:2024/06/16 07:19
static result_t __read_dns_config(const char *file_name, char *output_buf, size_t output_buf_len){ FILE *fp = NULL; size_t flen; LOGD(C_DNS_TAG, "read livepush config, file_name=%s", file_name); fp = fopen(file_name, "r"); if (NULL == fp) { LOGE(C_DNS_TAG, "open livepush dns config file failed"); goto L_ERROR; } fseek(fp, 0L, SEEK_END); flen=ftell(fp); if (output_buf_len < flen) { LOGE(C_DNS_TAG, "livepush config length=%u, but output buf length=%u", flen, output_buf_len); goto L_ERROR; } fseek(fp,0L,SEEK_SET); fread(output_buf, flen, 1, fp); fclose(fp); return E_OK;L_ERROR: if (NULL != fp) { fclose(fp); fp = NULL; } return E_FAILED;}
阅读全文
0 0
- fopen code
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- fopen
- caffemodel进行批量测试
- this
- 矩阵十大经典题目
- 棋盘问题
- CSDN个人博客不小心删除了怎么办
- fopen code
- IT 行业加班到底有没有价值?
- 统计Xcode整个工程的代码行数
- 用Hashtable实现简单的cache缓存
- foreach引用传值注意
- zip 压缩方式:按标准方式和存储方式压缩
- 攻击Wordpress应用程序(使用WPSCAN)
- SpringBoot整合freemarker
- python把csv数据做成列表、字典类型的数据进行存储脚本(readDataToDic_V2.2)