From 5e7c9554d4685026e80c95e9efa8a4dae0f399de Mon Sep 17 00:00:00 2001 From: Ben Brewer Date: Fri, 30 May 2014 15:20:37 +0100 Subject: Remove extern keyword since it's not needed The extern keyword is not needed since it's the default property for a function, it also takes up extra space on the line which leads to more wrapping. --- tbdiff/tbdiff-common.h | 4 ++-- tbdiff/tbdiff-io.h | 28 ++++++++++++++-------------- tbdiff/tbdiff-stat.h | 18 +++++++++--------- tbdiff/tbdiff-xattrs.h | 14 +++++++------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/tbdiff/tbdiff-common.h b/tbdiff/tbdiff-common.h index cbb5c0d..c60139d 100644 --- a/tbdiff/tbdiff-common.h +++ b/tbdiff/tbdiff-common.h @@ -126,7 +126,7 @@ tbd_error(tbd_error_e e, char const *s, char const *func, int line, } #endif -extern int tbd_apply (FILE *stream); -extern int tbd_create(FILE *stream, tbd_stat_t *a, tbd_stat_t *b); +int tbd_apply (FILE *stream); +int tbd_create(FILE *stream, tbd_stat_t *a, tbd_stat_t *b); #endif /* !__TBDIFF_COMMON_H__ */ diff --git a/tbdiff/tbdiff-io.h b/tbdiff/tbdiff-io.h index 585f670..dc18475 100644 --- a/tbdiff/tbdiff-io.h +++ b/tbdiff/tbdiff-io.h @@ -28,20 +28,20 @@ #include -extern size_t tbd_write_uint16(uint16_t value, FILE* stream); -extern size_t tbd_write_uint32(uint32_t value, FILE* stream); -extern size_t tbd_write_uint64(uint64_t value, FILE* stream); -extern size_t tbd_write_time(time_t value, FILE* stream); -extern size_t tbd_write_mode(mode_t value, FILE* stream); -extern size_t tbd_write_uid(uid_t value, FILE* stream); -extern size_t tbd_write_gid(gid_t value, FILE* stream); +size_t tbd_write_uint16(uint16_t value, FILE* stream); +size_t tbd_write_uint32(uint32_t value, FILE* stream); +size_t tbd_write_uint64(uint64_t value, FILE* stream); +size_t tbd_write_time(time_t value, FILE* stream); +size_t tbd_write_mode(mode_t value, FILE* stream); +size_t tbd_write_uid(uid_t value, FILE* stream); +size_t tbd_write_gid(gid_t value, FILE* stream); -extern size_t tbd_read_uint16(uint16_t *value, FILE* stream); -extern size_t tbd_read_uint32(uint32_t *value, FILE* stream); -extern size_t tbd_read_uint64(uint64_t *value, FILE* stream); -extern size_t tbd_read_time(time_t *value, FILE* stream); -extern size_t tbd_read_mode(mode_t *value, FILE* stream); -extern size_t tbd_read_uid(uid_t *value, FILE* stream); -extern size_t tbd_read_gid(gid_t *value, FILE* stream); +size_t tbd_read_uint16(uint16_t *value, FILE* stream); +size_t tbd_read_uint32(uint32_t *value, FILE* stream); +size_t tbd_read_uint64(uint64_t *value, FILE* stream); +size_t tbd_read_time(time_t *value, FILE* stream); +size_t tbd_read_mode(mode_t *value, FILE* stream); +size_t tbd_read_uid(uid_t *value, FILE* stream); +size_t tbd_read_gid(gid_t *value, FILE* stream); #endif /* !__TBDIFF_IO_H__ */ diff --git a/tbdiff/tbdiff-stat.h b/tbdiff/tbdiff-stat.h index 22da466..e4703d9 100644 --- a/tbdiff/tbdiff-stat.h +++ b/tbdiff/tbdiff-stat.h @@ -51,14 +51,14 @@ struct tbd_stat_s { uint32_t rdev; }; -extern tbd_stat_t* tbd_stat(const char *path); -extern void tbd_stat_free(tbd_stat_t *file); -extern void tbd_stat_print(tbd_stat_t *file); -extern tbd_stat_t* tbd_stat_entry(tbd_stat_t *file, uint32_t entry); -extern tbd_stat_t* tbd_stat_entry_find(tbd_stat_t *file, const char *name); -extern char* tbd_stat_subpath(tbd_stat_t *file, const char *entry); -extern char* tbd_stat_path(tbd_stat_t *file); -extern int tbd_stat_open(tbd_stat_t *file, int flags); -extern FILE* tbd_stat_fopen(tbd_stat_t *file, const char *mode); +tbd_stat_t* tbd_stat(const char *path); +void tbd_stat_free(tbd_stat_t *file); +void tbd_stat_print(tbd_stat_t *file); +tbd_stat_t* tbd_stat_entry(tbd_stat_t *file, uint32_t entry); +tbd_stat_t* tbd_stat_entry_find(tbd_stat_t *file, const char *name); +char* tbd_stat_subpath(tbd_stat_t *file, const char *entry); +char* tbd_stat_path(tbd_stat_t *file); +int tbd_stat_open(tbd_stat_t *file, int flags); +FILE* tbd_stat_fopen(tbd_stat_t *file, const char *mode); #endif /* !__TBDIFF_STAT_H__ */ diff --git a/tbdiff/tbdiff-xattrs.h b/tbdiff/tbdiff-xattrs.h index ba4a79e..7052e1a 100644 --- a/tbdiff/tbdiff-xattrs.h +++ b/tbdiff/tbdiff-xattrs.h @@ -32,33 +32,33 @@ typedef struct tbd_xattrs_names { } tbd_xattrs_names_t; /* gets a list of the names of the file referenced by path */ -extern int tbd_xattrs_names(char const *path, tbd_xattrs_names_t *names_out); +int tbd_xattrs_names(char const *path, tbd_xattrs_names_t *names_out); /* frees up the INTERNAL resources of the list, doesn't free the list itself */ -extern void tbd_xattrs_names_free(tbd_xattrs_names_t *names); +void tbd_xattrs_names_free(tbd_xattrs_names_t *names); /* calls f with every name in the list */ -extern int tbd_xattrs_names_each(tbd_xattrs_names_t const *names, +int tbd_xattrs_names_each(tbd_xattrs_names_t const *names, int (*f)(char const *name, void *ud), void *ud); /* gets how many different attributes there are in the list */ -extern int tbd_xattrs_names_count(tbd_xattrs_names_t const *names, uint32_t *count); +int tbd_xattrs_names_count(tbd_xattrs_names_t const *names, uint32_t *count); /* puts the value of the attribute called name into *buf with size *bufsize * if *buf is NULL or *bufsize is 0 then memory will be allocated for it * if *buf was too small it will be reallocated * if it is successful, *buf will contain *valsize bytes of data */ -extern int tbd_xattrs_get(char const *path, char const* name, void **buf, +int tbd_xattrs_get(char const *path, char const* name, void **buf, size_t *bufsize, size_t *valsize); /* removes all attributes of the file referenced by path */ -extern int tbd_xattrs_removeall(char const *path); +int tbd_xattrs_removeall(char const *path); /* calls f for every attribute:value pair in the list */ typedef int (*tbd_xattrs_pairs_callback_t)(char const *name, void const *data, size_t size, void *ud); -extern int tbd_xattrs_pairs(tbd_xattrs_names_t const *names, char const *path, +int tbd_xattrs_pairs(tbd_xattrs_names_t const *names, char const *path, tbd_xattrs_pairs_callback_t f, void *ud); #endif /* !__TBDIFF_XATTRS_H__ */ -- cgit v1.2.1