X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=zlint%2Fzlint.cpp;h=0c596e3022619ce1b0d8b8dc3cfe7e06101f27b9;hb=10c10dc81402e616b22c536f5b06d9471330c608;hp=0389974f6f8434f15b14c9578609fa48f7799b17;hpb=d53e0ff85ad63de947da013a0d25a434d12eed40;p=yazpp-moved-to-github.git diff --git a/zlint/zlint.cpp b/zlint/zlint.cpp index 0389974..0c596e3 100644 --- a/zlint/zlint.cpp +++ b/zlint/zlint.cpp @@ -1,8 +1,11 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2010 Index Data and Mike Taylor + * Copyright (C) 1998-2012 Index Data and Mike Taylor * See the file LICENSE for details. */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -32,9 +35,9 @@ private: int m_test_reported; }; -Zlint::Zlint(IPDU_Observable *the_PDU_Observable) : +Zlint::Zlint(IPDU_Observable *the_PDU_Observable) : Z_Assoc(the_PDU_Observable) - + { m_PDU_Observable = the_PDU_Observable; m_host = 0; @@ -146,7 +149,7 @@ IPDU_Observer *Zlint::sessionNotify( Z_ReferenceId *Zlint::mk_refid(const char *buf, int len) { - Z_ReferenceId *id = + Z_ReferenceId *id = (Z_ReferenceId *) odr_malloc(odr_encode(), sizeof(*id)); id->size = id->len = len; id->buf = (unsigned char*) odr_malloc(odr_encode(), len); @@ -157,15 +160,12 @@ Z_ReferenceId *Zlint::mk_refid(const char *buf, int len) int Zlint::initResponseGetVersion(Z_InitResponse *init) { int no = 0; - int off = 0; int i; for (i = 0; i<12; i++) if (ODR_MASK_GET(init->protocolVersion, no)) { no = i+1; } - else - off = 1; return no; }