Skip to content

Commit

Permalink
[codemod][fbsource] Apply clang-format 18
Browse files Browse the repository at this point in the history
Summary: Previously this code conformed from clang-format 12.

Reviewed By: igorsugak

Differential Revision: D56065247

fbshipit-source-id: f5a985dd8f8b84f2f9e1818b3719b43c5a1b05b3
  • Loading branch information
zertosh authored and facebook-github-bot committed Apr 14, 2024
1 parent d10cd94 commit 2f59b71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/hack_forked/fsnotify_win/fsnotify_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ static value parse_events(struct events* events) {
if (fileInfo->NextEntryOffset == 0)
break;
FILE_NOTIFY_INFORMATION* old = fileInfo;
fileInfo =
(FILE_NOTIFY_INFORMATION*)((char*)fileInfo + fileInfo->NextEntryOffset);
fileInfo = (FILE_NOTIFY_INFORMATION*)((char*)fileInfo +
fileInfo->NextEntryOffset);
free(old);
}
// Next event
Expand Down
6 changes: 3 additions & 3 deletions src/heap/hh_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static int win32_getpagesize(void) {
#define WORD_SIZE sizeof(value)

#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1)
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
#define CACHE_ALIGN(x) ALIGN(x, CACHE_LINE_SIZE)
#define WORD_ALIGN(x) ALIGN(x, WORD_SIZE)

Expand Down Expand Up @@ -330,7 +330,7 @@ static _Bool should_scan(hh_tag_t tag) {

// During GC, we read words from the heap which might be an addr or a header,
// and we need to distinguish between them.
#define Is_addr(x) (((x)&0b11) == 0)
#define Is_addr(x) (((x) & 0b11) == 0)

// The low 2 bits of headers are reserved for GC. The white bit pattern
// denotes an unmarked object, black denotes a marked object, and blue denotes a
Expand All @@ -339,7 +339,7 @@ static _Bool should_scan(hh_tag_t tag) {
#define Color_black 0b11
#define Color_blue 0b10

#define Obj_color(hd) ((hd)&0b11)
#define Obj_color(hd) ((hd) & 0b11)

#define Is_white(hd) (Obj_color(hd) == Color_white)
#define Is_black(hd) (Obj_color(hd) == Color_black)
Expand Down

0 comments on commit 2f59b71

Please sign in to comment.