GNU bug report logs -
#23153
[PATCH]: For FIXME in cp.c
Previous Next
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
[Message part 1 (text/plain, inline)]
unarchive 23153
stop
On 05/04/16 15:49, Rishabh Dave wrote:
> 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);
>>> +
Sorry for the delay.
I'll apply the attached variant to gnulib instead.
That has the property that --suffix=~ will still override
an env variable of SIMPLE_BACKUP_SUFFIX.
It also avoids a redundant malloc, and handles empty env variables.
I'll then apply the coreutils patches in your name.
thanks,
Pádraig
[gnulib-backupfile-no-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.