From 0f5964ad3cb6fca94651001b43e76ae0ef3032ec Mon Sep 17 00:00:00 2001 From: Jose Marcial Vieira Bisneto Date: Sat, 26 Nov 2016 10:20:23 -0300 Subject: [PATCH] path/path.c: Changed PopLastSegment parameters order. --- include/ipfs/path/path.h | 2 +- path/path.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ipfs/path/path.h b/include/ipfs/path/path.h index ba3b81e..0116ed2 100644 --- a/include/ipfs/path/path.h +++ b/include/ipfs/path/path.h @@ -25,7 +25,7 @@ int SegmentsLength (char **s); void FreeSegments (char ***s); int IsJustAKey (char *p); - int PopLastSegment (char *p, char **str); + int PopLastSegment (char **str, char *p); char *PathFromSegments(char *prefix, char **seg); int ParseCidToPath (char *dst, char *txt); int ParsePath (char *dst, char *txt); diff --git a/path/path.c b/path/path.c index 21d6223..d3f9fe7 100644 --- a/path/path.c +++ b/path/path.c @@ -82,7 +82,7 @@ int IsJustAKey (char *p) // PopLastSegment returns a new Path without its final segment, and the final // segment, separately. If there is no more to pop (the path is just a key), // the original path is returned. -int PopLastSegment (char *p, char **str) +int PopLastSegment (char **str, char *p) { if (IsJustAKey(p)) return 0; *str = strrchr(p, '/');