Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
b1cd474c
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b1cd474c
编写于
1月 30, 2010
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: Refer to virReportOOMError in the HACKING file
Instead of refering to __virRaiseError(VIR_ERROR_NO_MEMORY).
上级
a6b00cbb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
21 deletion
+21
-21
HACKING
HACKING
+11
-11
docs/hacking.html.in
docs/hacking.html.in
+10
-10
未找到文件。
HACKING
浏览文件 @
b1cd474c
...
@@ -166,13 +166,13 @@ codebase, because they encourage a number of serious coding bugs and do
...
@@ -166,13 +166,13 @@ codebase, because they encourage a number of serious coding bugs and do
not enable compile time verification of checks for NULL. Instead of these
not enable compile time verification of checks for NULL. Instead of these
routines, use the macros from memory.h
routines, use the macros from memory.h
- eg to allocate
a single object:
- eg to allocate a single object:
virDomainPtr domain;
virDomainPtr domain;
if (VIR_ALLOC(domain) < 0) {
if (VIR_ALLOC(domain) < 0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
...
@@ -182,8 +182,8 @@ routines, use the macros from memory.h
...
@@ -182,8 +182,8 @@ routines, use the macros from memory.h
int ndomains = 10;
int ndomains = 10;
if (VIR_ALLOC_N(domains, ndomains) < 0) {
if (VIR_ALLOC_N(domains, ndomains) < 0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
- eg to allocate an array of object pointers
- eg to allocate an array of object pointers
...
@@ -192,8 +192,8 @@ routines, use the macros from memory.h
...
@@ -192,8 +192,8 @@ routines, use the macros from memory.h
int ndomains = 10;
int ndomains = 10;
if (VIR_ALLOC_N(domains, ndomains) < 0) {
if (VIR_ALLOC_N(domains, ndomains) < 0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
- eg to re-allocate the array of domains to be longer
- eg to re-allocate the array of domains to be longer
...
@@ -201,8 +201,8 @@ routines, use the macros from memory.h
...
@@ -201,8 +201,8 @@ routines, use the macros from memory.h
ndomains = 20
ndomains = 20
if (VIR_REALLOC_N(domains, ndomains) < 0) {
if (VIR_REALLOC_N(domains, ndomains) < 0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
- eg to free the domain
- eg to free the domain
...
@@ -297,7 +297,7 @@ eg typical usage is as follows:
...
@@ -297,7 +297,7 @@ eg typical usage is as follows:
if (virBufferError(&buf)) {
if (virBufferError(&buf)) {
virBufferFreeAndReset(&buf);
virBufferFreeAndReset(&buf);
virReportOOMError(
...
);
virReportOOMError(
NULL
);
return NULL;
return NULL;
}
}
...
@@ -385,7 +385,7 @@ to build:
...
@@ -385,7 +385,7 @@ to build:
- if a recently commited patch breaks compilation on a platform
- if a recently commited patch breaks compilation on a platform
or for a given driver then it's fine to commit a minimal fix
or for a given driver then it's fine to commit a minimal fix
directly without getting the review feedback first
directly without getting the review feedback first
- similary if make check or make syntax-chek breaks, if there is
- similary if make check or make syntax-che
c
k breaks, if there is
an obvious fix, it's fine to commit immediately
an obvious fix, it's fine to commit immediately
The patch should still be sent to the list (or tell what the fix was if
The patch should still be sent to the list (or tell what the fix was if
trivial) and 'make check syntax-check' should pass too before commiting
trivial) and 'make check syntax-check' should pass too before commiting
...
...
docs/hacking.html.in
浏览文件 @
b1cd474c
...
@@ -192,8 +192,8 @@
...
@@ -192,8 +192,8 @@
virDomainPtr domain;
virDomainPtr domain;
if (VIR_ALLOC(domain)
<
0) {
if (VIR_ALLOC(domain)
<
0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
</pre></li>
</pre></li>
...
@@ -204,8 +204,8 @@
...
@@ -204,8 +204,8 @@
int ndomains = 10;
int ndomains = 10;
if (VIR_ALLOC_N(domains, ndomains)
<
0) {
if (VIR_ALLOC_N(domains, ndomains)
<
0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
</pre></li>
</pre></li>
...
@@ -216,8 +216,8 @@
...
@@ -216,8 +216,8 @@
int ndomains = 10;
int ndomains = 10;
if (VIR_ALLOC_N(domains, ndomains)
<
0) {
if (VIR_ALLOC_N(domains, ndomains)
<
0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
</pre></li>
</pre></li>
...
@@ -227,8 +227,8 @@
...
@@ -227,8 +227,8 @@
ndomains = 20
ndomains = 20
if (VIR_REALLOC_N(domains, ndomains)
<
0) {
if (VIR_REALLOC_N(domains, ndomains)
<
0) {
__virRaiseError(VIR_ERROR_NO_MEMORY)
virReportOOMError(NULL);
return NULL;
return NULL;
}
}
</pre></li>
</pre></li>
...
@@ -314,7 +314,7 @@
...
@@ -314,7 +314,7 @@
if (virBufferError(
&
buf)) {
if (virBufferError(
&
buf)) {
virBufferFreeAndReset(
&
buf);
virBufferFreeAndReset(
&
buf);
virReportOOMError(
...
);
virReportOOMError(
NULL
);
return NULL;
return NULL;
}
}
...
@@ -419,7 +419,7 @@
...
@@ -419,7 +419,7 @@
<li>
if a recently commited patch breaks compilation on a platform
<li>
if a recently commited patch breaks compilation on a platform
or for a given driver then it's fine to commit a minimal fix
or for a given driver then it's fine to commit a minimal fix
directly without getting the review feedback first
</li>
directly without getting the review feedback first
</li>
<li>
if make check or make syntax-chek breaks, if there is
<li>
if make check or make syntax-che
c
k breaks, if there is
an obvious fix, it's fine to commit immediately.
an obvious fix, it's fine to commit immediately.
The patch should still be sent to the list (or tell what the fix was if
The patch should still be sent to the list (or tell what the fix was if
trivial) and 'make check syntax-check' should pass too before commiting
trivial) and 'make check syntax-check' should pass too before commiting
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录