|
From: | Paul Eggert |
Subject: | bug#23153: [PATCH]: For FIXME in cp.c |
Date: | Mon, 4 Apr 2016 10:06:40 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |