From 5c222d044399182ca5f14a1bc126efa316bdd51e Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Fri, 2 Mar 2018 17:30:45 +0900 Subject: [PATCH] refactoring --- src/regenc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/regenc.c b/src/regenc.c index 7333cdd..21f3536 100644 --- a/src/regenc.c +++ b/src/regenc.c @@ -2,7 +2,7 @@ regenc.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2017 K.Kosako + * Copyright (c) 2002-2018 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -104,11 +104,11 @@ onig_initialize_encoding(OnigEncoding enc) if (enc != ONIG_ENCODING_ASCII && ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc)) { - if (ONIG_ENCODING_ASCII->init != 0 && - enc_is_inited(ONIG_ENCODING_ASCII) == 0) { - r = ONIG_ENCODING_ASCII->init(); + OnigEncoding ascii = ONIG_ENCODING_ASCII; + if (ascii->init != 0 && enc_is_inited(ascii) == 0) { + r = ascii->init(); if (r != ONIG_NORMAL) return r; - enc_inited_entry(ONIG_ENCODING_ASCII); + enc_inited_entry(ascii); } } -- 2.40.0