From 5294cafd14b418437f7419ffec0a3d57a3cce5da Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 12 May 2015 09:25:22 +0200 Subject: [PATCH] petsciiconv.c: move variables from global to local --- core/lib/petsciiconv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/lib/petsciiconv.c b/core/lib/petsciiconv.c index 36e5b69f6..a6eda5979 100644 --- a/core/lib/petsciiconv.c +++ b/core/lib/petsciiconv.c @@ -72,13 +72,12 @@ static unsigned char ascii2petscii[128] = { 0x58,0x59,0x5a,0xdb,0xdd,0xdd,0x5e,0xdf, }; -static unsigned int i; -static char *ptr; - /*-----------------------------------------------------------------------------------*/ void petsciiconv_toascii(char *buf, unsigned int len) { + unsigned int i; + char *ptr; char c; ptr = buf; @@ -108,6 +107,9 @@ petsciiconv_toascii(char *buf, unsigned int len) void petsciiconv_topetscii(char *buf, unsigned int len) { + unsigned int i; + char *ptr; + ptr = buf; for(i = len; i > 0; --i) { *ptr = ascii2petscii[*ptr & 0x7f];