summaryrefslogtreecommitdiff
path: root/tbdiff/tbdiff-common.h
diff options
context:
space:
mode:
authorBen Brewer <ben.brewer@codethink.co.uk>2014-05-29 11:44:45 +0100
committerBen Brewer <ben.brewer@codethink.co.uk>2014-06-02 11:03:00 +0100
commit9bb191462e637bc97b6bcbcfe798cc254ba7a7e4 (patch)
tree0a3804c055cb396eabf49f27c5f02f0dac65a4b5 /tbdiff/tbdiff-common.h
parente9344787030b3ba052db9f79462ffa5da3a0ee32 (diff)
downloadtbdiff-9bb191462e637bc97b6bcbcfe798cc254ba7a7e4.tar.gz
Create tbd_cmd_t type to for commands and use sizeof in write
Previously commands were just treated as a uint8_t and given the value of and enum. This is now made more clear in the code by defining tbd_cmd_t as a uint8_t below the enum in tbdiff-common.h.
Diffstat (limited to 'tbdiff/tbdiff-common.h')
-rw-r--r--tbdiff/tbdiff-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tbdiff/tbdiff-common.h b/tbdiff/tbdiff-common.h
index 06b3213..9e7fcd7 100644
--- a/tbdiff/tbdiff-common.h
+++ b/tbdiff/tbdiff-common.h
@@ -45,6 +45,8 @@ typedef enum {
TBD_CMD_XATTRS_UPDATE = 0x60,
} tbd_cmd_e;
+typedef uint8_t tbd_cmd_t;
+
typedef enum {
TBD_METADATA_NONE = 0x0,
TBD_METADATA_MTIME = 0x1,