]> err.no Git - varnish/commitdiff
More miniobj checks
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 1 Aug 2006 19:48:36 +0000 (19:48 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 1 Aug 2006 19:48:36 +0000 (19:48 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@593 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index 13a4ae8fb7fbe7e88ad2407a1d0f6a1039c680a2..ffa251bc9c3d379787ba9364e40207e8d9a7c903 100644 (file)
@@ -500,7 +500,7 @@ http_RecvHead(struct http *hp, int fd, struct event_base *eb, http_callback_f *f
 {
        unsigned l;
 
-       assert(hp != NULL);
+       CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC);
        assert(hp->v <= hp->e);
        assert(hp->t <= hp->v);
        if (0)
@@ -537,6 +537,8 @@ http_CopyHttp(struct http *to, struct http *fm)
 {
        unsigned u, l;
 
+       CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
+       CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
        l = 0;
        for (u = 0; u < fm->nhd; u++) {
                if (fm->hd[u].b == NULL)
@@ -656,6 +658,8 @@ http_FilterHeader(int fd, struct http *to, struct http *fm, unsigned how)
 {
        unsigned u;
 
+       CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
+       CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
        to->nhd = HTTP_HDR_FIRST;
        for (u = HTTP_HDR_FIRST; u < fm->nhd; u++) {
 #define HTTPH(a, b, c, d, e, f, g) \