From cfd67dda4967d2246ab1a9d852ad466a9b2a1a18 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 16 Aug 2009 00:21:17 -0700 Subject: Various fixes. --- tools/upbc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/upbc.c b/tools/upbc.c index 2185ee3..a324971 100644 --- a/tools/upbc.c +++ b/tools/upbc.c @@ -35,7 +35,7 @@ static void to_preproc(struct upb_string *str) str->ptr[i] = toupper(str->ptr[i]); } -static int memrchr(char *data, char c, size_t len) +static int my_memrchr(char *data, char c, size_t len) { int off = len-1; while(off > 0 && data[off] != c) --off; @@ -92,9 +92,9 @@ static void write_h(struct upb_symtab_entry *entries[], int num_entries, to_cident(enum_name); struct upb_string *enum_val_prefix = upb_strdup(&entry->e.key); - enum_val_prefix->byte_len = memrchr(enum_val_prefix->ptr, - UPB_SYMBOL_SEPARATOR, - enum_val_prefix->byte_len); + enum_val_prefix->byte_len = my_memrchr(enum_val_prefix->ptr, + UPB_SYMBOL_SEPARATOR, + enum_val_prefix->byte_len); enum_val_prefix->byte_len++; to_preproc(enum_val_prefix); -- cgit v1.2.3