mirror of
https://github.com/samba-team/samba.git
synced 2025-01-18 06:04:06 +03:00
CodingStyle: Update example to use our coding practice.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jan 20 18:51:55 CET 2015 on sn-devel-104
This commit is contained in:
parent
6f5ed44322
commit
852fda9cb5
@ -281,7 +281,7 @@ Good Examples:
|
||||
|
||||
if (y < 10) {
|
||||
z = malloc(sizeof(int) * y);
|
||||
if (!z) {
|
||||
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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user