Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Zlib
提交
fb4e0599
T
Third Party Zlib
项目概览
OpenHarmony
/
Third Party Zlib
接近 2 年 前同步成功
通知
18
Star
112
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Zlib
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fb4e0599
编写于
7月 08, 2012
作者:
M
Mark Adler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix argument checks in gzlog_compress() and gzlog_write().
上级
aef4174d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
7 deletion
+8
-7
examples/gzlog.c
examples/gzlog.c
+5
-5
examples/gzlog.h
examples/gzlog.h
+3
-2
未找到文件。
examples/gzlog.c
浏览文件 @
fb4e0599
/*
* gzlog.c
* Copyright (C) 2004, 2008 Mark Adler, all rights reserved
* Copyright (C) 2004, 2008
, 2012
Mark Adler, all rights reserved
* For conditions of distribution and use, see copyright notice in gzlog.h
* version 2.
0, 25 Apr 2008
* version 2.
1, 8 Jul 2012
*/
/*
...
...
@@ -913,7 +913,7 @@ int gzlog_compress(gzlog *logd)
struct
log
*
log
=
logd
;
/* check arguments */
if
(
log
==
NULL
||
strcmp
(
log
->
id
,
LOGID
)
||
len
<
0
)
if
(
log
==
NULL
||
strcmp
(
log
->
id
,
LOGID
))
return
-
3
;
/* see if we lost the lock -- if so get it again and reload the extra
...
...
@@ -997,9 +997,9 @@ int gzlog_write(gzlog *logd, void *data, size_t len)
struct
log
*
log
=
logd
;
/* check arguments */
if
(
log
==
NULL
||
strcmp
(
log
->
id
,
LOGID
)
||
len
<
0
)
if
(
log
==
NULL
||
strcmp
(
log
->
id
,
LOGID
))
return
-
3
;
if
(
data
==
NULL
||
len
=
=
0
)
if
(
data
==
NULL
||
len
<
=
0
)
return
0
;
/* see if we lost the lock -- if so get it again and reload the extra
...
...
examples/gzlog.h
浏览文件 @
fb4e0599
/* gzlog.h
Copyright (C) 2004, 2008 Mark Adler, all rights reserved
version 2.
0, 25 Apr 2008
Copyright (C) 2004, 2008
, 2012
Mark Adler, all rights reserved
version 2.
1, 8 Jul 2012
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
...
...
@@ -27,6 +27,7 @@
Interface changed slightly in that now path is a prefix
Compression now occurs as needed during gzlog_write()
gzlog_write() now always leaves the log file as valid gzip
2.1 8 Jul 2012 Fix argument checks in gzlog_compress() and gzlog_write()
*/
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录