From d04db4e48cc76accc559bbb30451b25936289a0d Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 31 Mar 2016 04:16:15 +0200 Subject: Added const qualifier to the input parameter of bin2hex Signed-off-by: Haru --- src/common/strlib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/common/strlib.c') diff --git a/src/common/strlib.c b/src/common/strlib.c index 997b01ffa..8f164f2e9 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team + * Copyright (C) 2012-2016 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -424,13 +424,12 @@ int strlib_strline(const char *str, size_t pos) /// @param output Output string /// @param input Binary input buffer /// @param count Number of bytes to convert -bool strlib_bin2hex(char *output, unsigned char *input, size_t count) +bool strlib_bin2hex(char *output, const unsigned char *input, size_t count) { char toHex[] = "0123456789abcdef"; size_t i; - for( i = 0; i < count; ++i ) - { + for (i = 0; i < count; ++i) { *output++ = toHex[(*input & 0xF0) >> 4]; *output++ = toHex[(*input & 0x0F) >> 0]; ++input; -- cgit v1.2.3-60-g2f50