]> Savannah Git Hosting - gnulib.git/commit
utimens: fix confusing arg type in internal func
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 Apr 2021 00:29:59 +0000 (17:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 Apr 2021 00:30:27 +0000 (17:30 -0700)
commita3a946f670718d0dee5a7425ad5ac0a29fb46ea1
tree25bec76279ff9b9bffdec3e4d1c7626389d5e6e4
parent2a7948aad478bcdcd2472b380054f84e7360ec10
utimens: fix confusing arg type in internal func

Although the old code was technically correct, this was accidental
and it understandably confused Coverity.  Reported by Ondrej Dubaj in:
https://lists.gnu.org/r/bug-tar/2021-04/msg00000.html
* lib/utimens.c (update_timespec): Change arg type from ‘struct
timespec *[2]’ (pointer to array of 2 pointers to timespecs) to
‘struct timespec **’ (pointer to pointer to the first timespec in
an array of 2 timespecs).  Although the old code happened to be
technically correct, it was misleading and confused Coverity.
And though the type ‘struct timespec (**)[2]’ (pointer to pointer
to array of 2 timespecs) would perhaps be more technically
correct, it would be almost as confusing and would require changes
elsewhere in this file; let’s quit while we’re ahead.
ChangeLog
lib/utimens.c