X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libbb%2Fwfopen.c;h=26e6a13e2b1f825dc2928cc0e3f58d4821355178;hb=83e5d6f77237b64853c194b0ce592e77ef677c4d;hp=ab77cb19edc20973f281fa9aec83c1d94984d85c;hpb=c7bda1ce659294d6e22c06e087f6f265983c7578;p=oweals%2Fbusybox.git diff --git a/libbb/wfopen.c b/libbb/wfopen.c index ab77cb19e..26e6a13e2 100644 --- a/libbb/wfopen.c +++ b/libbb/wfopen.c @@ -4,41 +4,17 @@ * * Copyright (C) 1999-2004 by Erik Andersen * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include -#include #include "libbb.h" -FILE *bb_wfopen(const char *path, const char *mode) +FILE *fopen_or_warn(const char *path, const char *mode) { - FILE *fp; - if ((fp = fopen(path, mode)) == NULL) { + FILE *fp = fopen(path, mode); + if (!fp) { bb_perror_msg("%s", path); errno = 0; } return fp; } - - -/* END CODE */ -/* -Local Variables: -c-file-style: "linux" -c-basic-offset: 4 -tab-width: 4 -End: -*/