diff options
-rw-r--r-- | e2fsprogs/Makefile.in | 2 | ||||
-rw-r--r-- | e2fsprogs/blkid/list.h | 123 | ||||
-rw-r--r-- | e2fsprogs/e2fsck.c | 10 | ||||
-rw-r--r-- | e2fsprogs/e2fsck.h | 7 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.c | 2 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 2 |
6 files changed, 17 insertions, 129 deletions
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in index 89470b787..160271686 100644 --- a/e2fsprogs/Makefile.in +++ b/e2fsprogs/Makefile.in | |||
@@ -12,7 +12,7 @@ E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs | |||
12 | E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h | 12 | E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h |
13 | 13 | ||
14 | BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \ | 14 | BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \ |
15 | probe.c read.c resolve.c save.c tag.c | 15 | probe.c read.c resolve.c save.c tag.c list.c |
16 | BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC)) | 16 | BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC)) |
17 | BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS)) | 17 | BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS)) |
18 | 18 | ||
diff --git a/e2fsprogs/blkid/list.h b/e2fsprogs/blkid/list.h index cbf16a059..8b06d853b 100644 --- a/e2fsprogs/blkid/list.h +++ b/e2fsprogs/blkid/list.h | |||
@@ -6,12 +6,6 @@ | |||
6 | extern "C" { | 6 | extern "C" { |
7 | #endif | 7 | #endif |
8 | 8 | ||
9 | #ifdef __GNUC__ | ||
10 | #define _INLINE_ static __inline__ | ||
11 | #else /* For Watcom C */ | ||
12 | #define _INLINE_ static inline | ||
13 | #endif | ||
14 | |||
15 | /* | 9 | /* |
16 | * Simple doubly linked list implementation. | 10 | * Simple doubly linked list implementation. |
17 | * | 11 | * |
@@ -35,113 +29,14 @@ struct list_head { | |||
35 | (ptr)->next = (ptr); (ptr)->prev = (ptr); \ | 29 | (ptr)->next = (ptr); (ptr)->prev = (ptr); \ |
36 | } while (0) | 30 | } while (0) |
37 | 31 | ||
38 | /* | 32 | void __list_add(struct list_head * add, struct list_head * prev, struct list_head * next); |
39 | * Insert a new entry between two known consecutive entries. | 33 | void list_add(struct list_head *add, struct list_head *head); |
40 | * | 34 | void list_add_tail(struct list_head *add, struct list_head *head); |
41 | * This is only for internal list manipulation where we know | 35 | void __list_del(struct list_head * prev, struct list_head * next); |
42 | * the prev/next entries already! | 36 | void list_del(struct list_head *entry); |
43 | */ | 37 | void list_del_init(struct list_head *entry); |
44 | _INLINE_ void __list_add(struct list_head * add, | 38 | int list_empty(struct list_head *head); |
45 | struct list_head * prev, | 39 | void list_splice(struct list_head *list, struct list_head *head); |
46 | struct list_head * next) | ||
47 | { | ||
48 | next->prev = add; | ||
49 | add->next = next; | ||
50 | add->prev = prev; | ||
51 | prev->next = add; | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * list_add - add a new entry | ||
56 | * @add: new entry to be added | ||
57 | * @head: list head to add it after | ||
58 | * | ||
59 | * Insert a new entry after the specified head. | ||
60 | * This is good for implementing stacks. | ||
61 | */ | ||
62 | _INLINE_ void list_add(struct list_head *add, struct list_head *head) | ||
63 | { | ||
64 | __list_add(add, head, head->next); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * list_add_tail - add a new entry | ||
69 | * @add: new entry to be added | ||
70 | * @head: list head to add it before | ||
71 | * | ||
72 | * Insert a new entry before the specified head. | ||
73 | * This is useful for implementing queues. | ||
74 | */ | ||
75 | _INLINE_ void list_add_tail(struct list_head *add, struct list_head *head) | ||
76 | { | ||
77 | __list_add(add, head->prev, head); | ||
78 | } | ||
79 | |||
80 | /* | ||
81 | * Delete a list entry by making the prev/next entries | ||
82 | * point to each other. | ||
83 | * | ||
84 | * This is only for internal list manipulation where we know | ||
85 | * the prev/next entries already! | ||
86 | */ | ||
87 | _INLINE_ void __list_del(struct list_head * prev, | ||
88 | struct list_head * next) | ||
89 | { | ||
90 | next->prev = prev; | ||
91 | prev->next = next; | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * list_del - deletes entry from list. | ||
96 | * @entry: the element to delete from the list. | ||
97 | * | ||
98 | * list_empty() on @entry does not return true after this, @entry is | ||
99 | * in an undefined state. | ||
100 | */ | ||
101 | _INLINE_ void list_del(struct list_head *entry) | ||
102 | { | ||
103 | __list_del(entry->prev, entry->next); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * list_del_init - deletes entry from list and reinitialize it. | ||
108 | * @entry: the element to delete from the list. | ||
109 | */ | ||
110 | _INLINE_ void list_del_init(struct list_head *entry) | ||
111 | { | ||
112 | __list_del(entry->prev, entry->next); | ||
113 | INIT_LIST_HEAD(entry); | ||
114 | } | ||
115 | |||
116 | /** | ||
117 | * list_empty - tests whether a list is empty | ||
118 | * @head: the list to test. | ||
119 | */ | ||
120 | _INLINE_ int list_empty(struct list_head *head) | ||
121 | { | ||
122 | return head->next == head; | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * list_splice - join two lists | ||
127 | * @list: the new list to add. | ||
128 | * @head: the place to add it in the first list. | ||
129 | */ | ||
130 | _INLINE_ void list_splice(struct list_head *list, struct list_head *head) | ||
131 | { | ||
132 | struct list_head *first = list->next; | ||
133 | |||
134 | if (first != list) { | ||
135 | struct list_head *last = list->prev; | ||
136 | struct list_head *at = head->next; | ||
137 | |||
138 | first->prev = head; | ||
139 | head->next = first; | ||
140 | |||
141 | last->next = at; | ||
142 | at->prev = last; | ||
143 | } | ||
144 | } | ||
145 | 40 | ||
146 | /** | 41 | /** |
147 | * list_entry - get the struct for this entry | 42 | * list_entry - get the struct for this entry |
@@ -171,8 +66,6 @@ _INLINE_ void list_splice(struct list_head *list, struct list_head *head) | |||
171 | for (pos = (head)->next, pnext = pos->next; pos != (head); \ | 66 | for (pos = (head)->next, pnext = pos->next; pos != (head); \ |
172 | pos = pnext, pnext = pos->next) | 67 | pos = pnext, pnext = pos->next) |
173 | 68 | ||
174 | #undef _INLINE_ | ||
175 | |||
176 | #ifdef __cplusplus | 69 | #ifdef __cplusplus |
177 | } | 70 | } |
178 | #endif | 71 | #endif |
diff --git a/e2fsprogs/e2fsck.c b/e2fsprogs/e2fsck.c index 4c0614add..985f9fd5c 100644 --- a/e2fsprogs/e2fsck.c +++ b/e2fsprogs/e2fsck.c | |||
@@ -726,7 +726,7 @@ static void e2fsck_free_dir_info(e2fsck_t ctx) | |||
726 | /* | 726 | /* |
727 | * Return the count of number of directories in the dir_info structure | 727 | * Return the count of number of directories in the dir_info structure |
728 | */ | 728 | */ |
729 | static inline int e2fsck_get_num_dirinfo(e2fsck_t ctx) | 729 | static int e2fsck_get_num_dirinfo(e2fsck_t ctx) |
730 | { | 730 | { |
731 | return ctx->dir_info_count; | 731 | return ctx->dir_info_count; |
732 | } | 732 | } |
@@ -1363,7 +1363,7 @@ e2fsck_handle_write_error(io_channel channel, unsigned long block, int count, | |||
1363 | return error; | 1363 | return error; |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | static inline const char *ehandler_operation(const char *op) | 1366 | static const char *ehandler_operation(const char *op) |
1367 | { | 1367 | { |
1368 | const char *ret = operation; | 1368 | const char *ret = operation; |
1369 | 1369 | ||
@@ -1491,7 +1491,7 @@ static void ll_rw_block(int rw, int nr, struct buffer_head *bhp[]) | |||
1491 | } | 1491 | } |
1492 | } | 1492 | } |
1493 | 1493 | ||
1494 | static inline void mark_buffer_dirty(struct buffer_head *bh) | 1494 | static void mark_buffer_dirty(struct buffer_head *bh) |
1495 | { | 1495 | { |
1496 | bh->b_dirty = 1; | 1496 | bh->b_dirty = 1; |
1497 | } | 1497 | } |
@@ -1508,7 +1508,7 @@ static void brelse(struct buffer_head *bh) | |||
1508 | ext2fs_free_mem(&bh); | 1508 | ext2fs_free_mem(&bh); |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | static inline int buffer_uptodate(struct buffer_head *bh) | 1511 | static int buffer_uptodate(struct buffer_head *bh) |
1512 | { | 1512 | { |
1513 | return bh->b_uptodate; | 1513 | return bh->b_uptodate; |
1514 | } | 1514 | } |
@@ -11074,7 +11074,7 @@ struct jbd_revoke_table_s | |||
11074 | /* Utility functions to maintain the revoke table */ | 11074 | /* Utility functions to maintain the revoke table */ |
11075 | 11075 | ||
11076 | /* Borrowed from buffer.c: this is a tried and tested block hash function */ | 11076 | /* Borrowed from buffer.c: this is a tried and tested block hash function */ |
11077 | static inline int hash(journal_t *journal, unsigned long block) | 11077 | static int hash(journal_t *journal, unsigned long block) |
11078 | { | 11078 | { |
11079 | struct jbd_revoke_table_s *table = journal->j_revoke; | 11079 | struct jbd_revoke_table_s *table = journal->j_revoke; |
11080 | int hash_shift = table->hash_shift; | 11080 | int hash_shift = table->hash_shift; |
diff --git a/e2fsprogs/e2fsck.h b/e2fsprogs/e2fsck.h index 52db828a9..e520632a0 100644 --- a/e2fsprogs/e2fsck.h +++ b/e2fsprogs/e2fsck.h | |||
@@ -629,12 +629,7 @@ struct e2fsck_struct { | |||
629 | }; | 629 | }; |
630 | 630 | ||
631 | 631 | ||
632 | 632 | #define tid_gt(x, y) ((x - y) > 0) | |
633 | static inline int tid_gt(tid_t x, tid_t y) | ||
634 | { | ||
635 | int difference = (x - y); | ||
636 | return (difference > 0); | ||
637 | } | ||
638 | 633 | ||
639 | static inline int tid_geq(tid_t x, tid_t y) | 634 | static inline int tid_geq(tid_t x, tid_t y) |
640 | { | 635 | { |
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index eb1f1db8d..ff4d5018c 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -144,7 +144,7 @@ int udhcpc_main(int argc, char *argv[]) | |||
144 | { | 144 | { |
145 | uint8_t *temp, *message; | 145 | uint8_t *temp, *message; |
146 | unsigned long t1 = 0, t2 = 0, xid = 0; | 146 | unsigned long t1 = 0, t2 = 0, xid = 0; |
147 | unsigned long start = 0, lease; | 147 | unsigned long start = 0, lease = 0; |
148 | fd_set rfds; | 148 | fd_set rfds; |
149 | int retval; | 149 | int retval; |
150 | struct timeval tv; | 150 | struct timeval tv; |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index f3de04653..9a5a04adb 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -258,7 +258,7 @@ void circ_message(const char *msg); | |||
258 | static void message(char *fmt, ...) __attribute__ ((format(printf, 1, 2))); | 258 | static void message(char *fmt, ...) __attribute__ ((format(printf, 1, 2))); |
259 | static void message(char *fmt, ...) | 259 | static void message(char *fmt, ...) |
260 | { | 260 | { |
261 | int fd; | 261 | int fd = -1; |
262 | struct flock fl; | 262 | struct flock fl; |
263 | va_list arguments; | 263 | va_list arguments; |
264 | 264 | ||