GNU bug report logs - #23153
[PATCH]: For FIXME in cp.c

Previous Next

Package: coreutils;

Reported by: Rishabh Dave <rishabhddave <at> gmail.com>

Date: Tue, 29 Mar 2016 21:11:01 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rishabh Dave <rishabhddave <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 23153 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigbrady.com>
Subject: bug#23153: [PATCH]: For FIXME in cp.c
Date: Tue, 5 Apr 2016 20:19:24 +0530
[Message part 1 (text/plain, inline)]
Did fix that - changing function call to GNU style and "suffix_from_env" to
local variable. The corresponding patch is attached.

On Mon, Apr 4, 2016 at 10:36 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> On 04/04/2016 09:30 AM, Rishabh Dave wrote:
>
>> +  char *suffix_from_env;
>>     size_t ssize;
>>     bool simple = true;
>>   +
>> +  /* If simple_backup_suffix is '~', check environment if we have any
>> there. */
>> +  if (strcmp(simple_backup_suffix, "~") == 0)
>> +    if ((suffix_from_env = getenv("SIMPLE_BACKUP_SUFFIX")) != NULL)
>> +      simple_backup_suffix = xstrdup (suffix_from_env);
>> +
>>
>
> The usual GNU style is "f (x)" rather than "f(x)" for function calls.
> Also, avoid side effects in an "if"; just have the then-part with a local
> variable "suffix_from_env" and put the subsidary if after that.
>
[Message part 2 (text/html, inline)]
[FIXME-regarding-getenv.patch (text/x-patch, attachment)]

This bug report was last modified 8 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.