mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-27 12:05:15 +00:00
nitpick: coding style
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
parent
844a2798eb
commit
317511e3ca
@ -19,10 +19,9 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "encoding.h"
|
#include "encoding.h"
|
||||||
|
|
||||||
int
|
int build_hostname(char *buf, size_t buflen, const char *data,
|
||||||
build_hostname(char *buf, size_t buflen,
|
const size_t datalen, const char *topdomain,
|
||||||
const char *data, const size_t datalen,
|
const struct encoder *encoder, int maxlen)
|
||||||
const char *topdomain, const struct encoder *encoder, int maxlen)
|
|
||||||
{
|
{
|
||||||
size_t space;
|
size_t space;
|
||||||
char *b;
|
char *b;
|
||||||
@ -55,16 +54,15 @@ build_hostname(char *buf, size_t buflen,
|
|||||||
return space;
|
return space;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int unpack_data(char *buf, size_t buflen, char *data, size_t datalen,
|
||||||
unpack_data(char *buf, size_t buflen, char *data, size_t datalen, const struct encoder *enc)
|
const struct encoder *enc)
|
||||||
{
|
{
|
||||||
if (!enc->eats_dots())
|
if (!enc->eats_dots())
|
||||||
datalen = inline_undotify(data, datalen);
|
datalen = inline_undotify(data, datalen);
|
||||||
return enc->decode(buf, &buflen, data, datalen);
|
return enc->decode(buf, &buflen, data, datalen);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int inline_dotify(char *buf, size_t buflen)
|
||||||
inline_dotify(char *buf, size_t buflen)
|
|
||||||
{
|
{
|
||||||
unsigned dots;
|
unsigned dots;
|
||||||
unsigned pos;
|
unsigned pos;
|
||||||
@ -101,8 +99,7 @@ inline_dotify(char *buf, size_t buflen)
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int inline_undotify(char *buf, size_t len)
|
||||||
inline_undotify(char *buf, size_t len)
|
|
||||||
{
|
{
|
||||||
unsigned pos;
|
unsigned pos;
|
||||||
unsigned dots;
|
unsigned dots;
|
||||||
|
Loading…
Reference in New Issue
Block a user