X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2FLPdir_unix.c;h=1bb2940b95ce0b784b872179d28135c23c37d10e;hb=49681ae147d691d64d640f8308dcc8e69557699c;hp=bead6abd71563b0f8fc162d44f528a58cf20c01a;hpb=0f113f3ee4d629ef9a4a30911b22b224772085e5;p=openssl.git diff --git a/crypto/LPdir_unix.c b/crypto/LPdir_unix.c index bead6abd71..1bb2940b95 100644 --- a/crypto/LPdir_unix.c +++ b/crypto/LPdir_unix.c @@ -1,7 +1,12 @@ /* - * $LP: LPlib/source/LPdir_unix.c,v 1.11 2004/09/23 22:07:22 _cvs_levitte Exp - * $ + * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html */ + /* * Copyright (c) 2004, Richard Levitte * All rights reserved. @@ -78,12 +83,12 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory) errno = 0; if (*ctx == NULL) { - *ctx = (LP_DIR_CTX *)malloc(sizeof(LP_DIR_CTX)); + *ctx = malloc(sizeof(**ctx)); if (*ctx == NULL) { errno = ENOMEM; return 0; } - memset(*ctx, '\0', sizeof(LP_DIR_CTX)); + memset(*ctx, 0, sizeof(**ctx)); (*ctx)->dir = opendir(directory); if ((*ctx)->dir == NULL) {