]> granicus.if.org Git - curl/commitdiff
krb5_encode: remove unused argument
authorDaniel Stenberg <daniel@haxx.se>
Wed, 8 Oct 2014 10:25:07 +0000 (12:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Oct 2014 10:25:07 +0000 (12:25 +0200)
Coverity CID 1241957. Removed the unused argument. As this struct and
pointer now are used only for krb5, there's no need to keep unused
function arguments around.

lib/curl_sec.h
lib/krb5.c
lib/security.c

index 82151e9c78ebba5346ba745e34af75b8ac21ad64..6c48da243ba57ecffb29477f2fb45447cdf52d37 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -30,7 +30,7 @@ struct Curl_sec_client_mech {
   void (*end)(void *);
   int (*check_prot)(void *, int);
   int (*overhead)(void *, int, int);
-  int (*encode)(void *, const void*, int, int, void**, struct connectdata *);
+  int (*encode)(void *, const void*, int, int, void**);
   int (*decode)(void *, void*, int, int, struct connectdata *);
 };
 
index 7e82a6805bad4134f4b69486c5782efb97a633e0..bc90c121879bd1a5c8297ab6e9fa16556c98435d 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (c) 1995, 1996, 1997, 1998, 1999, 2013 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden).
- * Copyright (c) 2004 - 2012 Daniel Stenberg
+ * Copyright (c) 2004 - 2014 Daniel Stenberg
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -121,8 +121,7 @@ krb5_overhead(void *app_data, int level, int len)
 }
 
 static int
-krb5_encode(void *app_data, const void *from, int length, int level, void **to,
-            struct connectdata *conn UNUSED_PARAM)
+krb5_encode(void *app_data, const void *from, int length, int level, void **to)
 {
   gss_ctx_id_t *context = app_data;
   gss_buffer_desc dec, enc;
@@ -130,9 +129,6 @@ krb5_encode(void *app_data, const void *from, int length, int level, void **to,
   int state;
   int len;
 
-  /* shut gcc up */
-  conn = NULL;
-
   /* NOTE that the cast is safe, neither of the krb5, gnu gss and heimdal
    * libraries modify the input buffer in gss_seal()
    */
index ca17c56417c19a6a042287ce0e121678453e0d6a..25cfa21706ce7c7c3e1592c33e303b8e242314b4 100644 (file)
@@ -295,7 +295,7 @@ static void do_sec_send(struct connectdata *conn, curl_socket_t fd,
       prot_level = conn->command_prot;
   }
   bytes = conn->mech->encode(conn->app_data, from, length, prot_level,
-                             (void**)&buffer, conn);
+                             (void**)&buffer);
   if(!buffer || bytes <= 0)
     return; /* error */