From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18331 invoked by alias); 20 May 2002 10:22:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18323 invoked from network); 20 May 2002 10:22:28 -0000 Received: from unknown (HELO harvester.transas.com) (193.125.200.2) by sources.redhat.com with SMTP; 20 May 2002 10:22:28 -0000 Received: from localhost (localhost [127.0.0.1]) by harvester.transas.com (Postfix) with SMTP id 44A216B823; Mon, 20 May 2002 14:22:27 +0400 (MSD) Received: from clue.transas.com (clue.transas.com [10.0.0.42]) by harvester.transas.com (Postfix) with ESMTP id 954A46B820; Mon, 20 May 2002 14:22:25 +0400 (MSD) Received: by clue.transas.com with Internet Mail Service (5.5.2653.19) id ; Mon, 20 May 2002 14:22:25 +0400 Message-ID: <2E74F312D6980D459F3A05492BA40F8DDD7A5E@clue.transas.com> From: Andrew Volkov To: Andrew Cagney , Kazu Hirata Cc: gdb-patches@sources.redhat.com Subject: RE: [patch] sim/h8300/compile.c: Fix formatting. Date: Mon, 20 May 2002 03:22:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" X-SW-Source: 2002-05/txt/msg00811.txt.bz2 Hi > >AndrewV, > >Don't forget the coding standard: > > http://www.gnu.org/prep/standards_toc.html > >One thing I noticed is variables like ``_dst''. The leading >underscore >shouldn't be used. > >enjoy, >Andrew > > Corrected Andrey 2002-05-20 Andrey Volkov (avolkov@transas.com) * compile.c: remove leading undescores in EEPMOV case. Index: compile.c =================================================================== RCS file: /cvs/src/src/sim/h8300/compile.c,v retrieving revision 1.15 diff -u -r1.15 compile.c --- compile.c 19 May 2002 12:52:54 -0000 1.15 +++ compile.c 20 May 2002 10:12:16 -0000 @@ -1141,25 +1141,25 @@ case O (O_EEPMOV, SW): if (h8300hmode||h8300smode) { - register unsigned char *_src,*_dst; + register unsigned char *src,*dst; unsigned int count = (code->opcode == O(O_EEPMOV, SW))?cpu.regs[R4_REGNUM]&0xffff: cpu.regs[R4_REGNUM]&0xff; - _src = cpu.regs[R5_REGNUM] < memory_size ? cpu.memory+cpu.regs[R5_REGNUM] : + src = cpu.regs[R5_REGNUM] < memory_size ? cpu.memory+cpu.regs[R5_REGNUM] : cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff); - if ((_src+count)>=(cpu.memory+memory_size)) + if ((src+count)>=(cpu.memory+memory_size)) { - if ((_src+count)>=(cpu.eightbit+0x100)) + if ((src+count)>=(cpu.eightbit+0x100)) goto illegal; } - _dst = cpu.regs[R6_REGNUM] < memory_size ? cpu.memory+cpu.regs[R6_REGNUM] : + dst = cpu.regs[R6_REGNUM] < memory_size ? cpu.memory+cpu.regs[R6_REGNUM] : cpu.eightbit + (cpu.regs[R6_REGNUM] & 0xff); - if ((_dst+count)>=(cpu.memory+memory_size)) + if ((dst+count)>=(cpu.memory+memory_size)) { - if ((_dst+count)>=(cpu.eightbit+0x100)) + if ((dst+count)>=(cpu.eightbit+0x100)) goto illegal; } - memcpy(_dst,_src,count); + memcpy(dst,src,count); cpu.regs[R5_REGNUM]+=count; cpu.regs[R6_REGNUM]+=count;