Author: axeld Date: 2009-11-26 17:33:03 +0100 (Thu, 26 Nov 2009) New Revision: 34290 Changeset: http://dev.haiku-os.org/changeset/34290/haiku Modified: haiku/trunk/src/system/libroot/posix/dirent.c Log: * Minor cleanup. Modified: haiku/trunk/src/system/libroot/posix/dirent.c =================================================================== --- haiku/trunk/src/system/libroot/posix/dirent.c 2009-11-26 16:30:16 UTC (rev 34289) +++ haiku/trunk/src/system/libroot/posix/dirent.c 2009-11-26 16:33:03 UTC (rev 34290) @@ -1,6 +1,6 @@ /* * Copyright 2009, Ingo Weinhold, ingo_weinhold@xxxxxxx - * Copyright 2004-2008, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx + * Copyright 2004-2009, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx * Distributed under the terms of the MIT License. */ @@ -100,10 +100,10 @@ DIR* __create_dir_struct(int fd) { - DIR* dir; - /* allocate the memory for the DIR structure */ - if ((dir = (DIR*)malloc(DIR_BUFFER_SIZE)) == NULL) { + + DIR* dir = (DIR*)malloc(DIR_BUFFER_SIZE); + if (dir == NULL) { errno = B_NO_MEMORY; return NULL; } @@ -117,7 +117,6 @@ } - // #pragma mark - public API