Skip to content

Commit

Permalink
ewok_rlw.h: add missing 'inline' to function definition
Browse files Browse the repository at this point in the history
The 'ewok_rlw.h' header file contains the rlw_get_run_bit() function
definition, which is marked as 'static' but not 'inline'. At least when
compiled by gcc, with the default -O2 optimization level, the function
is actually inlined and leaves no static version in the ewah_bitmap.o
and ewah_rlw.o object files. Despite this, add the missing 'inline'
keyword to better describe the intended behaviour.

Signed-off-by: Ramsay Jones <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
ramsay-jones authored and gitster committed Oct 29, 2018
1 parent 813fc44 commit 3a457a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ewah/ewok_rlw.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#define RLW_RUNNING_LEN_PLUS_BIT (((eword_t)1 << (RLW_RUNNING_BITS + 1)) - 1)

static int rlw_get_run_bit(const eword_t *word)
static inline int rlw_get_run_bit(const eword_t *word)
{
return *word & (eword_t)1;
}
Expand Down

0 comments on commit 3a457a0

Please sign in to comment.