Skip to content

Commit 03dc2cf

Browse files
committed
afs: Fix the afs_uuid struct to make the char-sized fields signed
In AFS's encoding of a UUID, the eight 'char' fields are all signed, so represent them with __s8 rather than __u8. This makes the compiler sign-extend them correctly when XDR-encoding them. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent f4b3526 commit 03dc2cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/afs/afs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ struct afs_uuid {
7979
__be32 time_low; /* low part of timestamp */
8080
__be16 time_mid; /* mid part of timestamp */
8181
__be16 time_hi_and_version; /* high part of timestamp and version */
82-
__u8 clock_seq_hi_and_reserved; /* clock seq hi and variant */
83-
__u8 clock_seq_low; /* clock seq low */
84-
__u8 node[6]; /* spatially unique node ID (MAC addr) */
82+
__s8 clock_seq_hi_and_reserved; /* clock seq hi and variant */
83+
__s8 clock_seq_low; /* clock seq low */
84+
__s8 node[6]; /* spatially unique node ID (MAC addr) */
8585
};
8686

8787
/*

0 commit comments

Comments
 (0)