Simplify some code in protocol_setvalue(), eliminating the "sigsize"

variable which was causing a compiler warning.
This commit is contained in:
Bob Halley 2001-03-14 17:59:25 +00:00
parent 2f02f32f04
commit 9ac88d91b4

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: protocol.c,v 1.36 2001/02/16 00:54:28 bwelling Exp $ */
/* $Id: protocol.c,v 1.37 2001/03/14 17:59:25 halley Exp $ */
/*
* Functions supporting the object management protocol.
@ -715,8 +715,6 @@ protocol_setvalue(omapi_object_t *h, omapi_string_t *name, omapi_data_t *value)
* ... it is a general problem in the current omapi design ...
*/
if (p->authname != NULL && p->algorithm != 0) {
unsigned int sigsize;
/*
* Verifying the key through a callback is (currently) only
* done by the server.
@ -735,13 +733,10 @@ protocol_setvalue(omapi_object_t *h, omapi_string_t *name, omapi_data_t *value)
result = auth_makekey(p->authname, p->algorithm, &p->key);
if (result == ISC_R_SUCCESS)
sigsize = ISC_MD5_DIGESTLENGTH;
if (result == ISC_R_SUCCESS)
result = isc_buffer_allocate(omapi_mctx,
&p->signature_out,
sigsize);
ISC_MD5_DIGESTLENGTH);
if (result != ISC_R_SUCCESS) {
if (p->key != NULL) {