From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 Date: Wed, 17 Nov 2010 01:10:15 +0200 From: "Kirill A. Shutemov" To: ALT Devel discussion list Message-ID: <20101116231015.GB14760@shutemov.name> References: <1289923002-14132-1-git-send-email-kirill@shutemov.name> <1289923002-14132-3-git-send-email-kirill@shutemov.name> <20101116221458.GA5126@altlinux.org> <20101116225453.GA14760@shutemov.name> <20101116230727.GA26592@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101116230727.GA26592@altlinux.org> User-Agent: Mutt/1.5.20 (2010-08-04) Subject: Re: [devel] [PATCH 2/8] set.c: get rid of nested functions X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 23:10:24 -0000 Archived-At: List-Archive: List-Post: On Wed, Nov 17, 2010 at 02:07:28AM +0300, Dmitry V. Levin wrote: > On Wed, Nov 17, 2010 at 12:54:53AM +0200, Kirill A. Shutemov wrote: > > On Wed, Nov 17, 2010 at 01:14:58AM +0300, Dmitry V. Levin wrote: > > > On Tue, Nov 16, 2010 at 05:56:36PM +0200, Kirill A. Shutsemov wrote: > > > [...] > > > > +static inline > > > > +char *put_digit(char *base62, int c) > > > > - void put_digit(int c) > > > > - { > > > > > > Why shouldn't this and other functions remain returning void? > > > > We shift base62 to the next position and want caller to know about this. > > > > So we have two options: > > > > - return new position; > > - pass char ** as argument instead of char *. > > > > Do you prefere the last one? > > Which one is more readable, > base62 = put_digit(base62, 61); > or > put_digit(&base62, 61); > ? Ok, I'll rework it. Any comments on other patches? -- Kirill A. Shutemov