From: Wayne Davison Date: Fri, 21 Mar 2008 14:26:25 +0000 (-0700) Subject: Changed d_name() to be a static inline function. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/27b067f87b85f0466d00707bff4817d8850d0ef2 Changed d_name() to be a static inline function. --- diff --git a/ifuncs.h b/ifuncs.h index 68130890..e032c67f 100644 --- a/ifuncs.h +++ b/ifuncs.h @@ -57,6 +57,16 @@ from_wire_mode(int mode) return mode; } +static inline char * +d_name(struct dirent *di) +{ +#ifdef HAVE_BROKEN_READDIR + return (di->d_name - 2); +#else + return di->d_name; +#endif +} + static inline int isDigit(const char *ptr) { diff --git a/syscall.c b/syscall.c index d4ff3f91..f1b73ea0 100644 --- a/syscall.c +++ b/syscall.c @@ -282,12 +282,3 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence) return lseek(fd, offset, whence); #endif } - -char *d_name(struct dirent *di) -{ -#ifdef HAVE_BROKEN_READDIR - return (di->d_name - 2); -#else - return di->d_name; -#endif -}