[svn] assuan - r260 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Fri Sep 7 17:55:44 CEST 2007
Author: marcus
Date: 2007-09-07 17:55:14 +0200 (Fri, 07 Sep 2007)
New Revision: 260
Modified:
trunk/src/assuan-inquire.c
Log:
2007-09-07 Marcus Brinkmann <marcus at g10code.de>
* assuan-inquire.c (assuan_inquire_ext): If MAXLEN is 0, still
initialize MEMBUF.
Modified: trunk/src/assuan-inquire.c
===================================================================
--- trunk/src/assuan-inquire.c 2007-09-07 15:39:32 UTC (rev 259)
+++ trunk/src/assuan-inquire.c 2007-09-07 15:55:14 UTC (rev 260)
@@ -351,23 +351,18 @@
assuan_error_t rc;
struct membuf *mb = NULL;
char cmdbuf[LINELENGTH-10]; /* (10 = strlen ("INQUIRE ")+CR,LF) */
- int nodataexpected;
if (!ctx || !keyword || (10 + strlen (keyword) >= sizeof (cmdbuf)))
return _assuan_error (ASSUAN_Invalid_Value);
- nodataexpected = !maxlen;
if (!ctx->is_server)
return _assuan_error (ASSUAN_Not_A_Server);
if (ctx->in_inquire)
return _assuan_error (ASSUAN_Nested_Commands);
- if (!nodataexpected)
- {
- mb = malloc (sizeof (struct membuf));
- if (!mb)
- return _assuan_error (ASSUAN_Out_Of_Core);
- init_membuf (mb, maxlen ? maxlen : 1024, maxlen);
- }
+ mb = malloc (sizeof (struct membuf));
+ if (!mb)
+ return _assuan_error (ASSUAN_Out_Of_Core);
+ init_membuf (mb, maxlen ? maxlen : 1024, maxlen);
strcpy (stpcpy (cmdbuf, "INQUIRE "), keyword);
rc = assuan_write_line (ctx, cmdbuf);
More information about the Gnupg-commits
mailing list