gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: fix path concatenation


From: gnunet
Subject: [taler-exchange] branch master updated: fix path concatenation
Date: Fri, 01 Nov 2019 17:09:55 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 29fac256 fix path concatenation
29fac256 is described below

commit 29fac256faea295476e901ec581db9533bb3fe29
Author: Florian Dold <address@hidden>
AuthorDate: Fri Nov 1 17:09:52 2019 +0100

    fix path concatenation
---
 src/util/util.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/util/util.c b/src/util/util.c
index 42977a16..10d5d53f 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -677,14 +677,12 @@ TALER_buffer_write_path (struct TALER_Buffer *buf, const 
char *str)
 {
   size_t len = strlen (str);
 
-  if (0 == len)
-    return;
-  if ('/' == str[0])
+  while ( (0 != len) && ('/' == str[0]) )
   {
     str++;
     len--;
   }
-  if ( (0 == buf->position) || ('/' != buf->mem[buf->position]) )
+  if ( (0 == buf->position) || ('/' != buf->mem[buf->position - 1]) )
   {
     TALER_buffer_ensure_remaining (buf, 1);
     buf->mem[buf->position++] = '/';

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]