From 72cd3ef8597581d172b02f7cbba8ed3cdf477396 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Thu, 12 Sep 2002 12:10:04 +0000 Subject: [PATCH] * keyserver.c (keyserver_spawn): Remove whitespace after keyserver commands. --- g10/ChangeLog | 5 +++++ g10/keyserver.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/g10/ChangeLog b/g10/ChangeLog index a180dfc55..001c555fd 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,8 @@ +2002-09-12 David Shaw + + * keyserver.c (keyserver_spawn): Remove whitespace after keyserver + commands. + 2002-09-10 David Shaw * exec.c (expand_args): Remove loop left over from earlier diff --git a/g10/keyserver.c b/g10/keyserver.c index 1afe1e7e4..eff486b0b 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -543,6 +543,7 @@ keyserver_spawn(int action,STRLIST list, for(;;) { char *ptr; + int plen; if(iobuf_read_line(spawn->fromchild,&line,&buflen,&maxlen)==0) { @@ -552,11 +553,11 @@ keyserver_spawn(int action,STRLIST list, ptr=line; - if(*ptr=='\r') - ptr++; - - if(*ptr=='\n') - ptr++; + /* remove trailing whitespace */ + plen=strlen(ptr); + while(plen>0 && isspace(ptr[plen-1])) + plen--; + plen[ptr]='\0'; if(*ptr=='\0') break;