Skip to content

Commit

Permalink
loader: Fix G overflowing for G(4) on 32-bit builds
Browse files Browse the repository at this point in the history
Prevent G(4) and over from overflowing for 32-bit builds.

Reviewed by: imp
Pull Request: freebsd/freebsd-src#1098
  • Loading branch information
VexedUXR authored and bsdimp committed May 29, 2024
1 parent dcc7b36 commit 5360d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stand/efi/loader/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "loader_efi.h"

#define M(x) ((x) * 1024 * 1024)
#define G(x) (1UL * (x) * 1024 * 1024 * 1024)
#define G(x) (1ULL * (x) * 1024 * 1024 * 1024)

#if defined(__amd64__)
#include <machine/cpufunc.h>
Expand Down

0 comments on commit 5360d01

Please sign in to comment.