summaryrefslogtreecommitdiffstats
path: root/common/percent.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-02-04 12:57:53 +0100
committerWerner Koch <wk@gnupg.org>2011-02-04 12:57:53 +0100
commitb008274afdbe375b32a7e66dbd073e200f6f0587 (patch)
tree219e239d39cf06be3f03aa82fb572080ac163a15 /common/percent.c
parentLet autogen.sh check the git config (diff)
downloadgnupg2-b008274afdbe375b32a7e66dbd073e200f6f0587.tar.xz
gnupg2-b008274afdbe375b32a7e66dbd073e200f6f0587.zip
Nuked almost all trailing white space.post-nuke-of-trailing-ws
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
Diffstat (limited to 'common/percent.c')
-rw-r--r--common/percent.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/common/percent.c b/common/percent.c
index e0c359289..172d7b765 100644
--- a/common/percent.c
+++ b/common/percent.c
@@ -46,13 +46,13 @@ percent_plus_escape (const char *string)
for (length=1, s=string; *s; s++)
{
- if (*s == '+' || *s == '\"' || *s == '%'
+ if (*s == '+' || *s == '\"' || *s == '%'
|| *(const unsigned char *)s < 0x20)
length += 3;
else
length++;
}
-
+
buffer = p = xtrymalloc (length);
if (!buffer)
return NULL;
@@ -82,7 +82,7 @@ percent_plus_escape (const char *string)
done if WITHPLUS is true. An escaped Nul character will be
replaced by NULREPL. */
static size_t
-do_unescape (unsigned char *buffer, const unsigned char *string,
+do_unescape (unsigned char *buffer, const unsigned char *string,
int withplus, int nulrepl)
{
unsigned char *p = buffer;
@@ -90,7 +90,7 @@ do_unescape (unsigned char *buffer, const unsigned char *string,
while (*string)
{
if (*string == '%' && string[1] && string[2])
- {
+ {
string++;
*p = xtoi_2 (string);
if (!*p)
@@ -119,7 +119,7 @@ count_unescape (const unsigned char *string)
while (*string)
{
if (*string == '%' && string[1] && string[2])
- {
+ {
string++;
string++;
}
@@ -181,7 +181,7 @@ do_unescape_inplace (char *string, int withplus, int nulrepl)
while (*string)
{
if (*string == '%' && string[1] && string[2])
- {
+ {
string++;
*p = xtoi_2 (string);
if (!*p)
@@ -226,4 +226,3 @@ percent_unescape_inplace (char *string, int nulrepl)
{
return do_unescape_inplace (string, 0, nulrepl);
}
-