mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
common: Remove unused vars in simple-pwquery.
* common/simple-pwquery.c (agent_send_option): Remove unused vars. (simple_query): Ditto. (agent_open): Ditto. Return RC on error. (simple_pwquery): Remove unused vars. Remove shadowing of 'p'. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
d4bd9743cf
commit
62f3e00277
@ -101,10 +101,7 @@ static int
|
|||||||
agent_send_option (assuan_context_t ctx, const char *name, const char *value)
|
agent_send_option (assuan_context_t ctx, const char *name, const char *value)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
char buf[200];
|
|
||||||
int nread;
|
|
||||||
char *line;
|
char *line;
|
||||||
int i;
|
|
||||||
|
|
||||||
line = spwq_malloc (7 + strlen (name) + 1 + strlen (value) + 2);
|
line = spwq_malloc (7 + strlen (name) + 1 + strlen (value) + 2);
|
||||||
if (!line)
|
if (!line)
|
||||||
@ -241,12 +238,7 @@ static int
|
|||||||
agent_open (assuan_context_t *ctx)
|
agent_open (assuan_context_t *ctx)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
int fd;
|
char *infostr;
|
||||||
char *infostr, *p;
|
|
||||||
struct sockaddr_un client_addr;
|
|
||||||
size_t len;
|
|
||||||
char line[200];
|
|
||||||
int nread;
|
|
||||||
|
|
||||||
infostr = default_gpg_agent_info;
|
infostr = default_gpg_agent_info;
|
||||||
if ( !infostr || !*infostr )
|
if ( !infostr || !*infostr )
|
||||||
@ -285,6 +277,7 @@ agent_open (assuan_context_t *ctx)
|
|||||||
errout:
|
errout:
|
||||||
assuan_release (*ctx);
|
assuan_release (*ctx);
|
||||||
*ctx = NULL;
|
*ctx = NULL;
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -373,13 +366,14 @@ simple_pwquery (const char *cacheid,
|
|||||||
int opt_check,
|
int opt_check,
|
||||||
int *errorcode)
|
int *errorcode)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
assuan_context_t ctx;
|
assuan_context_t ctx;
|
||||||
membuf_t data;
|
membuf_t data;
|
||||||
int nread;
|
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
char *pw = NULL;
|
char *pw = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
int rc, i;
|
size_t n;
|
||||||
|
|
||||||
|
|
||||||
rc = agent_open (&ctx);
|
rc = agent_open (&ctx);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -437,9 +431,6 @@ simple_pwquery (const char *cacheid,
|
|||||||
|
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
void *p;
|
|
||||||
size_t n;
|
|
||||||
|
|
||||||
p = get_membuf (&data, &n);
|
p = get_membuf (&data, &n);
|
||||||
if (p)
|
if (p)
|
||||||
wipememory (p, n);
|
wipememory (p, n);
|
||||||
@ -490,8 +481,6 @@ int
|
|||||||
simple_query (const char *query)
|
simple_query (const char *query)
|
||||||
{
|
{
|
||||||
assuan_context_t ctx;
|
assuan_context_t ctx;
|
||||||
char response[500];
|
|
||||||
int have = 0;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = agent_open (&ctx);
|
rc = agent_open (&ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user