From ca2fb9a46739dd51601e4f07bd9ac363bd07a11f Mon Sep 17 00:00:00 2001 From: uvman Date: Thu, 26 Oct 2006 19:10:05 +0000 Subject: [PATCH] Remove inline keywords from static non-one-liners of '.c' files. --- ChangeLog | 1 + include/ntfs/runlist.h | 5 ----- libntfs/attrib.c | 4 ++-- libntfs/bitmap.c | 2 +- libntfs/compress.c | 2 +- libntfs/device.c | 2 +- libntfs/dir.c | 2 +- libntfs/inode.c | 4 ++-- libntfs/runlist.c | 16 ++++++++-------- libntfs/win32_io.c | 10 +++++----- 10 files changed, 22 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20562846..f246d794 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,6 +55,7 @@ xx/xx/2006 - x.xx.x - . - Fix some byte-order conversion for u32 variables that used le16 conversion macros. (zhanglinbao, Yuval) - Spelling mistake fixes in debug logging strings. (Yuval) + - Remove inline keywords from static non-one-liners. (Szaka, Yuval) 21/06/2006 - 1.13.1 - Various fixes. diff --git a/include/ntfs/runlist.h b/include/ntfs/runlist.h index 726a28dc..0d066598 100644 --- a/include/ntfs/runlist.h +++ b/include/ntfs/runlist.h @@ -62,14 +62,9 @@ extern runlist_element *ntfs_runlists_merge(runlist_element *drl, extern runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol, const ATTR_RECORD *attr, runlist_element *old_rl); -extern int ntfs_get_nr_significant_bytes(const s64 n); - extern int ntfs_get_size_for_mapping_pairs(const ntfs_volume *vol, const runlist_element *rl, const VCN start_vcn); -extern int ntfs_write_significant_bytes(u8 *dst, const u8 *dst_max, - const s64 n); - extern int ntfs_mapping_pairs_build(const ntfs_volume *vol, u8 *dst, const int dst_len, const runlist_element *rl, const VCN start_vcn, VCN *const stop_vcn); diff --git a/libntfs/attrib.c b/libntfs/attrib.c index ddb3d9b5..815dfc98 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -274,7 +274,7 @@ s64 ntfs_get_attribute_value(const ntfs_volume *vol, * * Initialize the ntfs attribute @na with @ni, @type, @name, and @name_len. */ -static __inline__ void __ntfs_attr_init(ntfs_attr *na, ntfs_inode *ni, +static void __ntfs_attr_init(ntfs_attr *na, ntfs_inode *ni, const ATTR_TYPES type, ntfschar *name, const u32 name_len) { na->rl = NULL; @@ -2264,7 +2264,7 @@ int ntfs_attr_lookup(const ATTR_TYPES type, const ntfschar *name, * * Initialize the attribute search context @ctx with @ni and @mrec. */ -static __inline__ void ntfs_attr_init_search_ctx(ntfs_attr_search_ctx *ctx, +static void ntfs_attr_init_search_ctx(ntfs_attr_search_ctx *ctx, ntfs_inode *ni, MFT_RECORD *mrec) { if (!mrec) diff --git a/libntfs/bitmap.c b/libntfs/bitmap.c index 40d8e85a..6b1fc15a 100644 --- a/libntfs/bitmap.c +++ b/libntfs/bitmap.c @@ -55,7 +55,7 @@ * * On success return 0 and on error return -1 with errno set to the error code. */ -static __inline__ int ntfs_bitmap_set_bits_in_run(ntfs_attr *na, s64 start_bit, +static int ntfs_bitmap_set_bits_in_run(ntfs_attr *na, s64 start_bit, s64 count, int value) { s64 bufsize, br; diff --git a/libntfs/compress.c b/libntfs/compress.c index 737186e3..62d1f7f2 100644 --- a/libntfs/compress.c +++ b/libntfs/compress.c @@ -261,7 +261,7 @@ return_overflow: * code. Might be a bit confusing to debug but there really should never be * errors coming from here. */ -static __inline__ BOOL ntfs_is_cb_compressed(ntfs_attr *na, +static BOOL ntfs_is_cb_compressed(ntfs_attr *na, runlist_element *rl, VCN cb_start_vcn, int cb_clusters) { /* diff --git a/libntfs/device.c b/libntfs/device.c index 23d2c511..b4af89a4 100644 --- a/libntfs/device.c +++ b/libntfs/device.c @@ -469,7 +469,7 @@ s64 ntfs_cluster_write(const ntfs_volume *vol, const s64 lcn, * * Return 0 if it is valid and -1 if it is not valid. */ -static inline int ntfs_device_offset_valid(struct ntfs_device *dev, s64 ofs) +static int ntfs_device_offset_valid(struct ntfs_device *dev, s64 ofs) { char ch; diff --git a/libntfs/dir.c b/libntfs/dir.c index 44ce5b90..a76b61cd 100644 --- a/libntfs/dir.c +++ b/libntfs/dir.c @@ -629,7 +629,7 @@ typedef enum { * Pass information specifying the current directory entry @ie to the @filldir * callback. */ -static inline int ntfs_filldir(ntfs_inode *dir_ni, s64 *pos, u8 ivcn_bits, +static int ntfs_filldir(ntfs_inode *dir_ni, s64 *pos, u8 ivcn_bits, const INDEX_TYPE index_type, index_union iu, INDEX_ENTRY *ie, void *dirent, ntfs_filldir_t filldir) { diff --git a/libntfs/inode.c b/libntfs/inode.c index 58356765..2b1b9336 100644 --- a/libntfs/inode.c +++ b/libntfs/inode.c @@ -57,7 +57,7 @@ * * Returns: */ -static __inline__ ntfs_inode *__ntfs_inode_allocate(ntfs_volume *vol) +static ntfs_inode *__ntfs_inode_allocate(ntfs_volume *vol) { ntfs_inode *ni; @@ -88,7 +88,7 @@ ntfs_inode *ntfs_inode_allocate(ntfs_volume *vol) * * Returns: */ -static __inline__ int __ntfs_inode_release(ntfs_inode *ni) +static int __ntfs_inode_release(ntfs_inode *ni) { if (NInoDirty(ni)) ntfs_log_debug("Eeek. Discarding dirty inode!\n"); diff --git a/libntfs/runlist.c b/libntfs/runlist.c index a6203777..adcae4d3 100644 --- a/libntfs/runlist.c +++ b/libntfs/runlist.c @@ -100,7 +100,7 @@ static __inline__ void ntfs_rl_mc(runlist_element *dstbase, int dst, * On success, return a pointer to the newly allocated, or recycled, memory. * On error, return NULL with errno set to the error code. */ -static __inline__ runlist_element *ntfs_rl_realloc(runlist_element *rl, +static runlist_element *ntfs_rl_realloc(runlist_element *rl, int old_size, int new_size) { old_size = (old_size * sizeof(runlist_element) + 0xfff) & ~0xfff; @@ -121,7 +121,7 @@ static __inline__ runlist_element *ntfs_rl_realloc(runlist_element *rl, * Return: TRUE Success, the runlists can be merged. * FALSE Failure, the runlists cannot be merged. */ -static __inline__ BOOL ntfs_rl_are_mergeable(runlist_element *dst, +static BOOL ntfs_rl_are_mergeable(runlist_element *dst, runlist_element *src) { if (!dst || !src) { @@ -182,7 +182,7 @@ static __inline__ void __ntfs_rl_merge(runlist_element *dst, * On error, return NULL, with errno set to the error code. Both runlists are * left unmodified. */ -static __inline__ runlist_element *ntfs_rl_append(runlist_element *dst, +static runlist_element *ntfs_rl_append(runlist_element *dst, int dsize, runlist_element *src, int ssize, int loc) { BOOL right = FALSE; /* Right end of @src needs merging */ @@ -249,7 +249,7 @@ static __inline__ runlist_element *ntfs_rl_append(runlist_element *dst, * On error, return NULL, with errno set to the error code. Both runlists are * left unmodified. */ -static __inline__ runlist_element *ntfs_rl_insert(runlist_element *dst, +static runlist_element *ntfs_rl_insert(runlist_element *dst, int dsize, runlist_element *src, int ssize, int loc) { BOOL left = FALSE; /* Left end of @src needs merging */ @@ -345,7 +345,7 @@ static __inline__ runlist_element *ntfs_rl_insert(runlist_element *dst, * On error, return NULL, with errno set to the error code. Both runlists are * left unmodified. */ -static __inline__ runlist_element *ntfs_rl_replace(runlist_element *dst, +static runlist_element *ntfs_rl_replace(runlist_element *dst, int dsize, runlist_element *src, int ssize, int loc) { signed delta; @@ -432,7 +432,7 @@ static __inline__ runlist_element *ntfs_rl_replace(runlist_element *dst, * On error, return NULL, with errno set to the error code. Both runlists are * left unmodified. */ -static __inline__ runlist_element *ntfs_rl_split(runlist_element *dst, +static runlist_element *ntfs_rl_split(runlist_element *dst, int dsize, runlist_element *src, int ssize, int loc) { if (!dst || !src) { @@ -1220,7 +1220,7 @@ rl_err_out: * * Return the number of bytes written. This function cannot fail. */ -__inline__ int ntfs_get_nr_significant_bytes(const s64 n) +static int ntfs_get_nr_significant_bytes(const s64 n) { s64 l = n; int i; @@ -1363,7 +1363,7 @@ err_out: * Return the number of bytes written on success. On error, i.e. the * destination buffer @dst is too small, return -1 with errno set ENOSPC. */ -__inline__ int ntfs_write_significant_bytes(u8 *dst, const u8 *dst_max, +static int ntfs_write_significant_bytes(u8 *dst, const u8 *dst_max, const s64 n) { s64 l = n; diff --git a/libntfs/win32_io.c b/libntfs/win32_io.c index 5cfcbec9..752df435 100644 --- a/libntfs/win32_io.c +++ b/libntfs/win32_io.c @@ -222,7 +222,7 @@ static void ntfs_device_win32_init_imports(void) * * Supported flags are O_RDONLY, O_WRONLY and O_RDWR. */ -static __inline__ int ntfs_device_unix_status_flags_to_win32(int flags) +static int ntfs_device_unix_status_flags_to_win32(int flags) { int win_mode; @@ -508,7 +508,7 @@ static int ntfs_device_win32_getgeo(HANDLE handle, win32_fd *fd) * Return 0 if o.k. * -1 if not, and errno set. */ -static __inline__ int ntfs_device_win32_open_file(char *filename, win32_fd *fd, +static int ntfs_device_win32_open_file(char *filename, win32_fd *fd, int flags) { HANDLE handle; @@ -538,7 +538,7 @@ static __inline__ int ntfs_device_win32_open_file(char *filename, win32_fd *fd, * return 0 if o.k. * -1 if not, and errno set. */ -static __inline__ int ntfs_device_win32_open_drive(int drive_id, win32_fd *fd, +static int ntfs_device_win32_open_drive(int drive_id, win32_fd *fd, int flags) { HANDLE handle; @@ -1360,7 +1360,7 @@ static int ntfs_device_win32_stat(struct ntfs_device *dev, struct stat *buf) * Return 0 if o.k. * -1 if not, and errno set. Note if error fd->handle is trashed. */ -static __inline__ int ntfs_win32_hdio_getgeo(struct ntfs_device *dev, +static int ntfs_win32_hdio_getgeo(struct ntfs_device *dev, struct hd_geometry *argp) { win32_fd *fd = (win32_fd *)dev->d_private; @@ -1382,7 +1382,7 @@ static __inline__ int ntfs_win32_hdio_getgeo(struct ntfs_device *dev, * Return 0 if o.k. * -1 if not, and errno set. Note if error fd->handle is trashed. */ -static __inline__ int ntfs_win32_blksszget(struct ntfs_device *dev,int *argp) +static int ntfs_win32_blksszget(struct ntfs_device *dev,int *argp) { win32_fd *fd = (win32_fd *)dev->d_private; DWORD bytesReturned;