From 3688b39cab92af6840d541c60582bd327954ff50 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 7 Jul 2011 13:55:16 +0300 Subject: [PATCH] Eliminate fdNew() from the API - Nobody should be able to create file descriptors which are not attached to a file/descriptor of some kind, the only sane fd constructors are Fopen(), Fdopen() and fdDup(). - The same applies to fdFree() but its a bit more complicated, punting that till later... --- rpmio/rpmio.c | 2 +- rpmio/rpmio.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index daec2e9..f04748f 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -198,7 +198,7 @@ static const FDIO_t lzdio; * Update digest(s) attached to fd. */ static void fdUpdateDigests(FD_t fd, const void * buf, size_t buflen); - +static FD_t fdNew(void); /** */ int _rpmio_debug = 0; diff --git a/rpmio/rpmio.h b/rpmio/rpmio.h index f43192f..986194f 100644 --- a/rpmio/rpmio.h +++ b/rpmio/rpmio.h @@ -114,10 +114,6 @@ FD_t fdLink(void * cookie); */ FD_t fdFree(FD_t fd); -/** \ingroup rpmio - */ -FD_t fdNew (void); - /** */ int ufdCopy(FD_t sfd, FD_t tfd); -- 2.7.4