Stop insecurely covering up for lack of snprintf and vsnprintf

- we require C99 anyway
- snprintf is used unconditionally all around the tree
- if absolutely needed for portability, having insecure wrappers littered
  over the source is not the best way
This commit is contained in:
Panu Matilainen 2008-03-07 13:34:20 +02:00
parent de4085814e
commit 501197e5ef
3 changed files with 0 additions and 35 deletions

View File

@ -207,25 +207,6 @@ int rpmpsTrim(rpmps ps, rpmps filter)
return gotProblems;
}
#if !defined(HAVE_VSNPRINTF)
static inline int vsnprintf(char * buf, int nb,
const char * fmt, va_list ap)
{
return vsprintf(buf, fmt, ap);
}
#endif
#if !defined(HAVE_SNPRINTF)
static inline int snprintf(char * buf, int nb, const char * fmt, ...)
{
va_list ap;
int rc;
va_start(ap, fmt);
rc = vsnprintf(buf, nb, fmt, ap);
va_end(ap);
return rc;
}
#endif
rpmProblem rpmProblemCreate(rpmProblemType type,
const char * pkgNEVR,
fnpyKey key,

View File

@ -162,14 +162,6 @@ const char * rpmlogLevelPrefix(rpmlogLvl pri)
return prefix;
}
#if !defined(HAVE_VSNPRINTF)
static inline int vsnprintf(char * buf, int nb,
const char * fmt, va_list ap)
{
return vsprintf(buf, fmt, ap);
}
#endif
/* FIX: rpmlogMsgPrefix[] dependent, not unqualified */
/* FIX: rpmlogMsgPrefix[] may be NULL */
static void vrpmlog (unsigned code, const char *fmt, va_list ap)

View File

@ -21,14 +21,6 @@
#include "debug.h"
#if !defined(HAVE_VSNPRINTF)
static inline int vsnprintf(char * buf, int nb,
const char * fmt, va_list ap)
{
return vsprintf(buf, fmt, ap);
}
#endif
#define INITSTATE(_lua, lua) \
rpmlua lua = _lua ? _lua : \
(globalLuaState ? globalLuaState : \