Skip to content

Commit 69a7ae5

Browse files
bors[bot]cgzones
andauthored
Merge #466
466: Adjust roundUp for 0 as input r=Mic92 a=cgzones Co-authored-by: Christian Göttsche <[email protected]>
2 parents da035d6 + 5b88266 commit 69a7ae5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/patchelf.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ static void writeFile(const std::string & fileName, const FileContents & content
479479

480480
static uint64_t roundUp(uint64_t n, uint64_t m)
481481
{
482+
if (n == 0)
483+
return m;
482484
return ((n - 1) / m + 1) * m;
483485
}
484486

0 commit comments

Comments
 (0)