summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/user.c b/user.c
index 9aff07c..9a84fe4 100644
--- a/user.c
+++ b/user.c
@@ -275,7 +275,10 @@ WriteMsgSend(FILE *file, const routine_t *rt)
char SendSize[24];
if (rt->rtNumRequestVar == 0)
+ {
sprintf(SendSize, "%d", rt->rtRequestSize);
+ fprintf(file, "\t_Static_assert(sizeof(Request) == %s, \"Request expected to be %s bytes\");\n", SendSize, SendSize);
+ }
else
strcpy(SendSize, "msgh_size");
@@ -339,8 +342,10 @@ WriteMsgRPC(FILE *file, const routine_t *rt)
char SendSize[24];
if (rt->rtNumRequestVar == 0)
+ {
sprintf(SendSize, "%d", rt->rtRequestSize);
- else
+ fprintf(file, "\t_Static_assert(sizeof(Request) == %s, \"Request expected to be %s bytes\");\n", SendSize, SendSize);
+ } else
strcpy(SendSize, "msgh_size");
if (IsKernelUser)