Skip to content

Commit

Permalink
Minor: moved "digits" to local scope
Browse files Browse the repository at this point in the history
  • Loading branch information
XaviDCR92 committed Jun 4, 2020
1 parent 3390159 commit 8ce6abf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ typedef int (*dbg_dec_func)(const char *buf, size_t buf_len, char *data, size_t
* Const Data
****************************************************************************/

const char digits[] = "0123456789abcdef";

/*****************************************************************************
* Prototypes
****************************************************************************/
Expand Down Expand Up @@ -172,6 +170,7 @@ int dbg_strtol(const char *str, size_t len, int base, const char **endptr)
char dbg_get_digit(int val)
{
if ((val >= 0) && (val <= 0xf)) {
static const char digits[] = "0123456789abcdef";
return digits[val];
} else {
return EOF;
Expand Down

0 comments on commit 8ce6abf

Please sign in to comment.