summaryrefslogtreecommitdiff
path: root/tbdiff/tbdiff-apply.c
diff options
context:
space:
mode:
authorBen Brewer <ben.brewer@codethink.co.uk>2014-05-30 16:04:21 +0100
committerBen Brewer <ben.brewer@codethink.co.uk>2014-06-02 15:53:42 +0100
commit539ccd77d3017965cd70444ba80ce95799d9337d (patch)
treefd149d1f4c2baf1c42cd46d62dc3da4d981e7cc9 /tbdiff/tbdiff-apply.c
parent5e7c9554d4685026e80c95e9efa8a4dae0f399de (diff)
downloadtbdiff-539ccd77d3017965cd70444ba80ce95799d9337d.tar.gz
Remove use of typedef to avoid naming conflicts with POSIX
POSIX reserves the use of the underscore T postfix for types, since most of the time we don't actually need to typedef the types and since it's more clear to prefix structs and enums with the struct and enum keywords, I've removed all uses of typedef and gone with the more simple approach used in the kernel. One typedef remains which is tbd_cmd_type, since this should be a native type of a fixed size. The postfix changed to type to show that it's a type and to ensure it doesn't collide with POSIX.
Diffstat (limited to 'tbdiff/tbdiff-apply.c')
-rw-r--r--tbdiff/tbdiff-apply.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tbdiff/tbdiff-apply.c b/tbdiff/tbdiff-apply.c
index 666d876..225da27 100644
--- a/tbdiff/tbdiff-apply.c
+++ b/tbdiff/tbdiff-apply.c
@@ -93,8 +93,8 @@ tbd_apply_read_block(FILE *stream, void **data, size_t *size)
static int
tbd_apply_identify(FILE *stream)
{
- tbd_cmd_t cmd;
- if(fread(&cmd, sizeof(tbd_cmd_t), 1, stream) != 1)
+ tbd_cmd_type cmd;
+ if(fread(&cmd, sizeof(tbd_cmd_type), 1, stream) != 1)
return TBD_ERROR(TBD_ERROR_UNABLE_TO_READ_STREAM);
if(cmd != TBD_CMD_IDENTIFY)
return TBD_ERROR(TBD_ERROR_INVALID_PARAMETER);
@@ -721,8 +721,8 @@ tbd_apply(FILE *stream)
uintptr_t depth = 0;
bool flush = false;
while(!flush) {
- tbd_cmd_t cmd;
- if(fread(&cmd, sizeof(tbd_cmd_t), 1, stream) != 1)
+ tbd_cmd_type cmd;
+ if(fread(&cmd, sizeof(tbd_cmd_type), 1, stream) != 1)
return TBD_ERROR(TBD_ERROR_UNABLE_TO_READ_STREAM);
switch(cmd) {
case TBD_CMD_DIR_CREATE: