The branch, master has been updated
       via  852fda9 CodingStyle: Update example to use our coding practice.
      from  6f5ed44 tdb_wrap: don't let tdb_wrap_open() segfault with name==NULL

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 852fda9cb5c18a2454b80b16ab35aece58b53abb
Author: Andreas Schneider <[email protected]>
Date:   Tue Jan 20 12:07:38 2015 +0100

    CodingStyle: Update example to use our coding practice.
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Tue Jan 20 18:51:55 CET 2015 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 README.Coding | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/README.Coding b/README.Coding
index f19399e..52dca49 100644
--- a/README.Coding
+++ b/README.Coding
@@ -280,8 +280,8 @@ Good Examples:
                int ret = 0;
 
                if (y < 10) {
-                       z = malloc(sizeof(int)*y);
-                       if (!z) {
+                       z = malloc(sizeof(int) * y);
+                       if (z == NULL) {
                                ret = 1;
                                goto done;
                        }
@@ -290,7 +290,7 @@ Good Examples:
                print("Allocated %d elements.\n", y);
 
         done:
-               if (z) {
+               if (z != NULL) {
                        free(z);
                }
 
@@ -352,7 +352,7 @@ debugger.
 Good example:
 
        x = malloc(sizeof(short)*10);
-       if (!x) {
+       if (x == NULL) {
                fprintf(stderr, "Unable to alloc memory!\n");
        }
 


-- 
Samba Shared Repository

Reply via email to