Patchwork [2/5] petitboot: Use enum type in pb_protocol_create_message

login
register
mail settings
Submitter Geoff Levand
Date Jan. 13, 2009, 1:28 a.m.
Message ID <496BEE55.7090909@am.sony.com>
Download mbox | patch
Permalink /patch/18130/
State Accepted
Delegated to: Jeremy Kerr
Headers show

Comments

Geoff Levand - Jan. 13, 2009, 1:28 a.m.
To better illustrate the usage of pb_protocol_create_message(),
change the type of the arg action from int to enum pb_protocol_action.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
 lib/pb-protocol/pb-protocol.c |    2 +-
 lib/pb-protocol/pb-protocol.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch

--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -201,7 +201,7 @@  int pb_protocol_write_message(int fd, st
 }
 
 struct pb_protocol_message *pb_protocol_create_message(void *ctx,
-		int action, int payload_len)
+		enum pb_protocol_action action, int payload_len)
 {
 	struct pb_protocol_message *message;
 
--- a/lib/pb-protocol/pb-protocol.h
+++ b/lib/pb-protocol/pb-protocol.h
@@ -52,7 +52,7 @@  int pb_protocol_serialise_device(struct 
 int pb_protocol_write_message(int fd, struct pb_protocol_message *message);
 
 struct pb_protocol_message *pb_protocol_create_message(void *ctx,
-		int action, int payload_len);
+		enum pb_protocol_action action, int payload_len);
 
 struct pb_protocol_message *pb_protocol_read_message(void *ctx, int fd);