[PATCH] ctdb: Coverity fix for CID 1291643

David Disseldorp ddiss at suse.de
Tue Mar 31 09:32:56 MDT 2015


Hi Rajesh,

On Tue, 31 Mar 2015 09:59:15 -0400 (EDT), Rajesh Joseph wrote:

> Hi all,
> 
> This is a fix for coverity bug CID 1291643. 
> Please review the patch and let me know if you have any comments.

Looks good, but I think a check for ctdb->name talloc_asprintf()
failures should also be added alongside this change...

355         ctdb->name = talloc_asprintf(ctdb, "%s:%u",
356                                      ctdb_addr_to_str(ctdb->address),
357                                      ctdb_addr_to_port(ctdb->address));
358         DEBUG(DEBUG_INFO,("ctdb chose network address %s\n", ctdb->name));

Also, please limit lines to 80 chars and avoid using Yoda notation -
most sane compilers catch bogus assignments in if conditions nowadays.

Cheers, David


More information about the samba-technical mailing list