mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 22:19:10 +00:00
Fix some minor issues
This commit is contained in:
parent
d484e1dbd4
commit
a8ff220654
4 changed files with 5 additions and 4 deletions
|
@ -30,7 +30,7 @@ char *xstrndup(const char *, size_t) paramsnonnull()
|
|||
returnspointerwithnoaliases dontthrow nocallback dontdiscard returnsnonnull;
|
||||
char *xstrcat(const char *, ...) paramsnonnull((1)) nullterminated()
|
||||
returnspointerwithnoaliases dontthrow nocallback dontdiscard returnsnonnull;
|
||||
#define xstrcat(...) (xstrcat)(__VA_ARGS__, 0)
|
||||
#define xstrcat(...) (xstrcat)(__VA_ARGS__, NULL)
|
||||
char *xstrmul(const char *, size_t) paramsnonnull((1))
|
||||
returnspointerwithnoaliases dontthrow nocallback dontdiscard returnsnonnull;
|
||||
char *xinet_ntop(int, const void *) paramsnonnull()
|
||||
|
|
|
@ -43,6 +43,6 @@ char *xjoinpaths(const char *path, const char *other) {
|
|||
} else if (_endswith(path, "/")) {
|
||||
return xstrcat(path, other);
|
||||
} else {
|
||||
return xstrcat(path, '/', other);
|
||||
return xstrcat(path, (uintptr_t)'/', other);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue