[master] 133e2b2 Use VCL_xxx types and add missing matching prototypes
Federico G. Schwindt
fgsch at lodoss.net
Tue Jun 24 01:35:28 CEST 2014
commit 133e2b222c0bfbfb98b9b0d9c26937164d062701
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Jun 23 23:44:21 2014 +0100
Use VCL_xxx types and add missing matching prototypes
While here unify check.
diff --git a/lib/libvmod_std/vmod_std_conversions.c b/lib/libvmod_std/vmod_std_conversions.c
index 7c1ac08..589d708 100644
--- a/lib/libvmod_std/vmod_std_conversions.c
+++ b/lib/libvmod_std/vmod_std_conversions.c
@@ -43,8 +43,8 @@
#include "vsa.h"
#include "vcc_if.h"
-VCL_DURATION __match_proto__()
-vmod_duration(const struct vrt_ctx *ctx, const char *p, VCL_DURATION d)
+VCL_DURATION __match_proto__(td_std_duration)
+vmod_duration(const struct vrt_ctx *ctx, VCL_STRING p, VCL_DURATION d)
{
char *e;
double r;
@@ -100,8 +100,8 @@ vmod_duration(const struct vrt_ctx *ctx, const char *p, VCL_DURATION d)
return (r);
}
-VCL_INT __match_proto__()
-vmod_integer(const struct vrt_ctx *ctx, const char *p, VCL_INT i)
+VCL_INT __match_proto__(td_std_integer)
+vmod_integer(const struct vrt_ctx *ctx, VCL_STRING p, VCL_INT i)
{
char *e;
long r;
@@ -121,10 +121,7 @@ vmod_integer(const struct vrt_ctx *ctx, const char *p, VCL_INT i)
r = strtol(p, &e, 0);
- if (e == NULL)
- return (i);
-
- if (*e != '\0')
+ if (e == NULL || *e != '\0')
return (i);
return (r);
@@ -169,7 +166,7 @@ vmod_ip(const struct vrt_ctx *ctx, VCL_STRING s, VCL_IP d)
return (r);
}
-VCL_REAL __match_proto__()
+VCL_REAL __match_proto__(td_std_real)
vmod_real(const struct vrt_ctx *ctx, VCL_STRING p, VCL_REAL d)
{
char *e;
More information about the varnish-commit
mailing list