Skip to content

Commit

Permalink
krb5_encode: remove unused argument
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bagder committed Oct 8, 2014
1 parent 987a4a7 commit b90f6e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/curl_sec.h
Expand Up @@ -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
Expand All @@ -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 *);
};

Expand Down
8 changes: 2 additions & 6 deletions lib/krb5.c
Expand Up @@ -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
Expand Down Expand Up @@ -121,18 +121,14 @@ 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;
OM_uint32 maj, min;
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()
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/security.c
Expand Up @@ -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 */

Expand Down

0 comments on commit b90f6e8

Please sign in to comment.