printf-format-fix.c revision 39863223172efe59ef2d8660cf78becc41fc7481
/* Copyright (c) 2002-2007 Timo Sirainen */
#include "lib.h"
#include "printf-format-fix.h"
static const char *
{
const char *errstr;
char *buf;
/* we'll assume that there's only one %m in the format string.
this simplifies the code and there's really no good reason to have
it multiple times. */
/* @UNSAFE */
return buf;
}
static const char *
{
const char *p;
for (p = format; *p != '\0'; ) {
if (*p++ == '%') {
switch (*p) {
case 'n':
i_panic("%%n modifier used");
case 'm':
case '\0':
i_panic("%% modifier missing");
}
}
}
return format;
}
{
const char *ret;
return ret;
}
const char *printf_format_fix(const char *format)
{
const char *ret;
unsigned int len;
return ret;
}
const char *printf_format_fix_unsafe(const char *format)
{
unsigned int len;
}