lib

morphux C utility library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/lib

commit 130b9388e8971870e64b083b1b4b4a1ca2919390
parent 70b5da33c4f1585a188463a39e920d8dc28b844c
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 23 May 2017 18:20:56 +0200

Fix(Mockups): Better alignement

Diffstat:
Minc/fail_test.h | 20++++++++++----------
Msrc/test.c | 22+++++++++++-----------
2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/inc/fail_test.h b/inc/fail_test.h @@ -20,16 +20,16 @@ # undef strdup -# define malloc(size) fl_malloc(size) -# define write(fd, ptr, len) fl_write(fd, ptr, len) -# define read(fd, ptr, len) fl_read(fd, ptr, len) -# define close(fd) fl_close(fd) -# define strdup(str) fl_strdup(str) -# define fstat(fd, buf) fl_fstat(fd, buf) -# define calloc(memb, size) fl_calloc(memb, size) -# define strcpy(dst, src) fl_strcpy(dst, src) -# define strcat(dst, src) fl_strcat(dst, src) -# define mkdir(path, mode) fl_mkdir(path, mode) +# define malloc(size) fl_malloc(size) +# define write(fd, ptr, len) fl_write(fd, ptr, len) +# define read(fd, ptr, len) fl_read(fd, ptr, len) +# define close(fd) fl_close(fd) +# define strdup(str) fl_strdup(str) +# define fstat(fd, buf) fl_fstat(fd, buf) +# define calloc(memb, size) fl_calloc(memb, size) +# define strcpy(dst, src) fl_strcpy(dst, src) +# define strcat(dst, src) fl_strcat(dst, src) +# define mkdir(path, mode) fl_mkdir(path, mode) # define fork fl_fork #include <errno.h> diff --git a/src/test.c b/src/test.c @@ -24,17 +24,17 @@ /* Real functions */ -static void *(*real_malloc)(size_t) = &malloc; -static ssize_t (*real_write)(int, const void *, size_t) = &write; -static ssize_t (*real_read)(int, void *, size_t) = &read; -static int (*real_close)(int) = &close; -static char *(*real_strdup)(const char *) = &strdup; -static int (*real_fstat)(int, struct stat *) = &fstat; -static void *(*real_calloc)(size_t, size_t) = &calloc; -static char *(*real_strcpy)(char *, const char *) = &strcpy; -static char *(*real_strcat)(char *, const char *) = &strcat; -static int (*real_mkdir)(const char *, mode_t) = &mkdir; -static pid_t (*real_fork)(void) = &fork; +static void *(*real_malloc)(size_t) = &malloc; +static ssize_t (*real_write)(int, const void *, size_t) = &write; +static ssize_t (*real_read)(int, void *, size_t) = &read; +static int (*real_close)(int) = &close; +static char *(*real_strdup)(const char *) = &strdup; +static int (*real_fstat)(int, struct stat *) = &fstat; +static void *(*real_calloc)(size_t, size_t) = &calloc; +static char *(*real_strcpy)(char *, const char *) = &strcpy; +static char *(*real_strcat)(char *, const char *) = &strcat; +static int (*real_mkdir)(const char *, mode_t) = &mkdir; +static pid_t (*real_fork)(void) = &fork; # include <fail_test.h>