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, '/');