Skip to content

Commit

Permalink
assigments/parallel-firewall: Use proper __packed__ attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Anton-Fabian Patras <[email protected]>
  • Loading branch information
fabianpatras committed Nov 4, 2024
1 parent 0ee7ed7 commit 59612b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/assignments/parallel-firewall/src/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ typedef enum {

#define RES_TO_STR(decision) ((decision == PASS) ? "PASS" : "DROP")

typedef struct __packed so_hdr_t {
typedef struct __attribute__((__packed__)) so_hdr_t {

Check failure on line 15 in content/assignments/parallel-firewall/src/packet.h

View workflow job for this annotation

GitHub Actions / Checkpatch

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((__packed__))
unsigned int source;
unsigned int dest;
unsigned long timestamp;
} so_hdr_t;

typedef struct __packed so_packet_t {
typedef struct __attribute__((__packed__)) so_packet_t {

Check failure on line 21 in content/assignments/parallel-firewall/src/packet.h

View workflow job for this annotation

GitHub Actions / Checkpatch

WARNING:PREFER_DEFINED_ATTRIBUTE_MACRO: Prefer __packed over __attribute__((__packed__))
so_hdr_t hdr;
char payload[PKT_SZ - sizeof(so_hdr_t)];
} so_packet_t;
Expand Down

0 comments on commit 59612b2

Please sign in to comment.