Skip to content
Snippets Groups Projects
Commit 3ba235a0 authored by Markus Armbruster's avatar Markus Armbruster Committed by Kevin Wolf
Browse files

block: Use g_new0() for a bit of extra type checking


g_new(T, 1) is safer than g_malloc(sizeof(T)), because it returns T *
rather than void *, which lets the compiler catch more type errors.

Missed in commit 02c4f26b.

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Message-id: 1417697709-13087-1-git-send-email-armbru@redhat.com
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 625fa9fe
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment