aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Bolte <matthias.bolte@googlemail.com>2010-01-30 12:35:04 +0100
committerMatthias Bolte <matthias.bolte@googlemail.com>2010-02-04 19:09:28 +0100
commitb1cd474c7726bbcd17faeb69e3a984a5d7af5e4b (patch)
tree2c49b82b4b734eeeec67a7f4bd86030d2a6c3582 /HACKING
parentesx: Cleanup preprocessing structure in esxVI_EnsureSession (diff)
downloadlibvirt-b1cd474c7726bbcd17faeb69e3a984a5d7af5e4b.tar.gz
libvirt-b1cd474c7726bbcd17faeb69e3a984a5d7af5e4b.tar.bz2
libvirt-b1cd474c7726bbcd17faeb69e3a984a5d7af5e4b.zip
docs: Refer to virReportOOMError in the HACKING file
Instead of refering to __virRaiseError(VIR_ERROR_NO_MEMORY).
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING22
1 files changed, 11 insertions, 11 deletions
diff --git a/HACKING b/HACKING
index 3844e50b8..4bf216cf4 100644
--- a/HACKING
+++ b/HACKING
@@ -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
routines, use the macros from memory.h
- - eg to allocate a single object:
+ - eg to allocate a single object:
virDomainPtr domain;
if (VIR_ALLOC(domain) < 0) {
- __virRaiseError(VIR_ERROR_NO_MEMORY)
- return NULL;
+ virReportOOMError(NULL);
+ return NULL;
}
@@ -182,8 +182,8 @@ routines, use the macros from memory.h
int ndomains = 10;
if (VIR_ALLOC_N(domains, ndomains) < 0) {
- __virRaiseError(VIR_ERROR_NO_MEMORY)
- return NULL;
+ virReportOOMError(NULL);
+ return NULL;
}
- eg to allocate an array of object pointers
@@ -192,8 +192,8 @@ routines, use the macros from memory.h
int ndomains = 10;
if (VIR_ALLOC_N(domains, ndomains) < 0) {
- __virRaiseError(VIR_ERROR_NO_MEMORY)
- return NULL;
+ virReportOOMError(NULL);
+ return NULL;
}
- eg to re-allocate the array of domains to be longer
@@ -201,8 +201,8 @@ routines, use the macros from memory.h
ndomains = 20
if (VIR_REALLOC_N(domains, ndomains) < 0) {
- __virRaiseError(VIR_ERROR_NO_MEMORY)
- return NULL;
+ virReportOOMError(NULL);
+ return NULL;
}
- eg to free the domain
@@ -297,7 +297,7 @@ eg typical usage is as follows:
if (virBufferError(&buf)) {
virBufferFreeAndReset(&buf);
- virReportOOMError(...);
+ virReportOOMError(NULL);
return NULL;
}
@@ -385,7 +385,7 @@ to build:
- if a recently commited patch breaks compilation on a platform
or for a given driver then it's fine to commit a minimal fix
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-check breaks, if there is
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
trivial) and 'make check syntax-check' should pass too before commiting