prefer inline functions
Costa Tsaousis (ktsaou) committed
Feb 18, 2018 at 02:38 UTC
24536ce513914a053c988f8caffd2f1bcfcfd0c9
1 file changed
+5
-6
src/procfile.c
+5
-6
@@ -39,8 +39,7 @@ char *procfile_filename(procfile *ff) {
39
// ----------------------------------------------------------------------------
40
// An array of words
41
42
-NOINLINE
43
-static void pfwords_add(procfile *ff, char *str) {
42
+static inline void pfwords_add(procfile *ff, char *str) {
43
// debug(D_PROCFILE, PF_PREFIX ": adding word No %d: '%s'", fw->len, str);
44
45
pfwords *fw = ff->words;
@@ -55,7 +54,7 @@ static void pfwords_add(procfile *ff, char *str) {
54
}
55
56
NEVERNULL
58
-static pfwords *pfwords_new(void) {
57
+static inline pfwords *pfwords_new(void) {
58
// debug(D_PROCFILE, PF_PREFIX ": initializing words");
59
60
size_t size = (procfile_adaptive_initial_allocation) ? procfile_max_words : PFWORDS_INCREASE_STEP;
@@ -81,8 +80,8 @@ static inline void pfwords_free(pfwords *fw) {
80
// ----------------------------------------------------------------------------
81
// An array of lines
82
84
-NEVERNULL NOINLINE
85
-static size_t *pflines_add(procfile *ff) {
83
+NEVERNULL
84
+static inline size_t *pflines_add(procfile *ff) {
85
// debug(D_PROCFILE, PF_PREFIX ": adding line %d at word %d", fl->len, first_word);
86
87
pflines *fl = ff->lines;
@@ -101,7 +100,7 @@ static size_t *pflines_add(procfile *ff) {
100
}
101
102
NEVERNULL
104
-static pflines *pflines_new(void) {
103
+static inline pflines *pflines_new(void) {
104
// debug(D_PROCFILE, PF_PREFIX ": initializing lines");
105
106
size_t size = (unlikely(procfile_adaptive_initial_allocation)) ? procfile_max_words : PFLINES_INCREASE_STEP;