[libvirt] [PATCH] docs: Refer to virReportOOMError in the HACKING file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of refering to __virRaiseError(VIR_ERROR_NO_MEMORY).
---
 HACKING              |   22 +++++++++++-----------
 docs/hacking.html.in |   20 ++++++++++----------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/HACKING b/HACKING
index 3844e50..4bf216c 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
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 96f6657..71b4f47 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -192,8 +192,8 @@
       virDomainPtr domain;
 
       if (VIR_ALLOC(domain) &lt; 0) {
-         __virRaiseError(VIR_ERROR_NO_MEMORY)
-         return NULL;
+          virReportOOMError(NULL);
+          return NULL;
       }
 </pre></li>
 
@@ -204,8 +204,8 @@
        int ndomains = 10;
 
        if (VIR_ALLOC_N(domains, ndomains) &lt; 0) {
-         __virRaiseError(VIR_ERROR_NO_MEMORY)
-         return NULL;
+           virReportOOMError(NULL);
+           return NULL;
        }
 </pre></li>
 
@@ -216,8 +216,8 @@
        int ndomains = 10;
 
        if (VIR_ALLOC_N(domains, ndomains) &lt; 0) {
-         __virRaiseError(VIR_ERROR_NO_MEMORY)
-         return NULL;
+           virReportOOMError(NULL);
+           return NULL;
        }
 </pre></li>
 
@@ -227,8 +227,8 @@
        ndomains = 20
 
        if (VIR_REALLOC_N(domains, ndomains) &lt; 0) {
-         __virRaiseError(VIR_ERROR_NO_MEMORY)
-         return NULL;
+           virReportOOMError(NULL);
+           return NULL;
        }
 </pre></li>
 
@@ -314,7 +314,7 @@
 
      if (virBufferError(&amp;buf)) {
          virBufferFreeAndReset(&amp;buf);
-         virReportOOMError(...);
+         virReportOOMError(NULL);
          return NULL;
      }
 
@@ -419,7 +419,7 @@
       <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
         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-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
-- 
1.6.3.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]