Bug #409

More s/malloc(size) + init/calloc(1, size)/ replacements

Added by dnsmichi almost 4 years ago. Updated almost 4 years ago.

Status:ResolvedStart date:04/30/2010
Priority:NormalDue date:
Assignee:dnsmichi% Done:

100%

Category:Other
Target version:1.0.2
Icinga Version: OS Version:

Description

http://git.op5.org/git/?p=nagios.git;a=commit;h=e61679d14bb614167d835fd33dcba6c098b97539

More s/malloc(size) + init/calloc(1, size)/ replacements

This time in common/comments.c and common/downtime.c. Since we
really don't want to use explicit initialization on memory that
in all likelihood is already nul'ed out, as memory returned by
calloc() always is, and memory returned from malloc() that has
not been re-used by libc but comes straight from the kernel is,
this is a good thing.

Signed-off-by: Andreas Ericsson <ae@op5.se>

Associated revisions

Revision 2fcb5b5f
Added by dnsmichi almost 4 years ago

more s/malloc(size) + init/calloc(1, size)/ replacements (Andreas Ericsson)

[--snip--]
This time in common/comments.c and common/downtime.c. Since we
really don't want to use explicit initialization on memory that
in all likelihood is already nul'ed out, as memory returned by
calloc() always is, and memory returned from malloc() that has
not been re-used by libc but comes straight from the kernel is,
this is a good thing.
[--snip--]

fixes #409

History

#1 Updated by dnsmichi almost 4 years ago

  • Assignee set to dnsmichi
  • Target version set to 1.0.2

#2 Updated by dnsmichi almost 4 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF