mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
maint: avoid static analysis warnings in ln.c
* src/ln.c (do_link): It's not obvious that record_file() is a noop in the symlink case (in that case dest_set is NULL and so ignored). So to make it obvious, and to avoid false positives seen in coverity, add the explicit condition here.
This commit is contained in:
1 parent
d2980924ac
commit
e9cb3eb6ce
1 file changed
+2
-1
@@ -343,7 +343,8 @@ do_link (const char *source, const char *dest)
|
||||
{
|
||||
/* Right after creating a hard link, do this: (note dest name and
|
||||
source_stats, which are also the just-linked-destinations stats) */
|
||||
record_file (dest_set, dest, &source_stats);
|
||||
if (! symbolic_link)
|
||||
record_file (dest_set, dest, &source_stats);
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user