aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-07 22:51:52 +0100
committerMax Kellermann <max@duempel.org>2014-01-07 23:10:56 +0100
commitcc60d193ce55b1fb8180bf199002bf34c2bf2088 (patch)
tree8e17fa2abee4638ab1f9199410f4352ae464742d /src
parent0f99410ba1334670554b9eeda122cdbe1e0478d7 (diff)
downloadmpd-cc60d193ce55b1fb8180bf199002bf34c2bf2088.tar.gz
mpd-cc60d193ce55b1fb8180bf199002bf34c2bf2088.tar.xz
mpd-cc60d193ce55b1fb8180bf199002bf34c2bf2088.zip
Directory: use g_malloc() instead of g_malloc0()
Explicit attribute initialization.
Diffstat (limited to 'src')
-rw-r--r--src/Directory.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Directory.cxx b/src/Directory.cxx
index a64b4d84c..20fb44618 100644
--- a/src/Directory.cxx
+++ b/src/Directory.cxx
@@ -44,9 +44,9 @@ Directory::Allocate(const char *path)
const size_t path_size = strlen(path) + 1;
Directory *directory =
- (Directory *)g_malloc0(sizeof(*directory)
- - sizeof(directory->path)
- + path_size);
+ (Directory *)g_malloc(sizeof(*directory)
+ - sizeof(directory->path)
+ + path_size);
new(directory) Directory(path);
return directory;
@@ -61,6 +61,7 @@ Directory::Directory()
}
Directory::Directory(const char *_path)
+ :mtime(0), have_stat(false)
{
INIT_LIST_HEAD(&children);
INIT_LIST_HEAD(&songs);