Skip to content

Commit

Permalink
lib/fs/readlink/: readlinknul(): Fix return type
Browse files Browse the repository at this point in the history
Fixes: 419ce14 (2024-11-01, "lib/fs/readlink/: readlinknul(): Add function")
Cc: Serge Halyn <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar authored and hallyn committed Dec 10, 2024
1 parent b9d00b6 commit 8821d3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/fs/readlink/readlinknul.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include "fs/readlink/readlinknul.h"

#include <stddef.h>
#include <sys/types.h>


extern inline int readlinknul(const char *restrict link, char *restrict buf,
extern inline ssize_t readlinknul(const char *restrict link, char *restrict buf,
size_t size);
4 changes: 2 additions & 2 deletions lib/fs/readlink/readlinknul.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@


ATTR_STRING(1)
inline int readlinknul(const char *restrict link, char *restrict buf,
inline ssize_t readlinknul(const char *restrict link, char *restrict buf,
size_t size);


// Similar to readlink(2), but terminate the string.
inline int
inline ssize_t
readlinknul(const char *restrict link, char *restrict buf, size_t size)
{
size_t ulen;
Expand Down

0 comments on commit 8821d3f

Please sign in to comment.