use GSSEAP_ASSERT macro instead of assert
[mech_eap.orig] / mech_eap / export_sec_context.c
index 5f89903..e5be6d8 100644 (file)
@@ -47,7 +47,6 @@ gssEapExportPartialContext(OM_uint32 *minor,
     size_t length, serverLen = 0;
     unsigned char *p;
     char serverBuf[MAXHOSTNAMELEN];
-
     if (ctx->acceptorCtx.radConn != NULL) {
         if (rs_conn_get_current_peer(ctx->acceptorCtx.radConn,
                                      serverBuf, sizeof(serverBuf)) != 0) {
@@ -60,7 +59,6 @@ gssEapExportPartialContext(OM_uint32 *minor,
         }
         serverLen = strlen(serverBuf);
     }
-
     length = 4 + serverLen + 4 + ctx->acceptorCtx.state.length;
 
     token->value = GSSEAP_MALLOC(length);
@@ -88,7 +86,7 @@ gssEapExportPartialContext(OM_uint32 *minor,
         p += ctx->acceptorCtx.state.length;
     }
 
-    assert(p == (unsigned char *)token->value + token->length);
+    GSSEAP_ASSERT(p == (unsigned char *)token->value + token->length);
 
     major = GSS_S_COMPLETE;
     *minor = 0;
@@ -197,7 +195,7 @@ gssEapExportSecContext(OM_uint32 *minor,
     if (partialCtx.value != NULL)
         p = store_buffer(&partialCtx, p, FALSE);
 
-    assert(p == (unsigned char *)token->value + token->length);
+    GSSEAP_ASSERT(p == (unsigned char *)token->value + token->length);
 
     major = GSS_S_COMPLETE;
     *minor = 0;