mirror of
https://github.com/clearlinux/graphene.git
synced 2026-10-03 15:39:36 +00:00
[LibOS] shim_parser.c: Additionally specify string as "const char*"
The parser logic checks the arguments of syscalls and prints strings in debug output. Previously, our code base only contained "const char *" as strings. Recently, we started migration to "const char*" (no-space) style. This broke the parser logic, so this commit adds an additional check on what it means for a C type to be a string.
This commit is contained in:
@@ -441,7 +441,7 @@ static inline void parse_integer_arg(va_list ap) {
|
||||
static inline void parse_syscall_args(va_list ap) {
|
||||
const char* arg_type = va_arg(ap, const char*);
|
||||
|
||||
if (strcmp_static(arg_type, "const char *"))
|
||||
if (strcmp_static(arg_type, "const char *") || strcmp_static(arg_type, "const char*"))
|
||||
parse_string_arg(ap);
|
||||
else if (is_pointer(arg_type))
|
||||
parse_pointer_arg(ap);
|
||||
@@ -452,7 +452,7 @@ static inline void parse_syscall_args(va_list ap) {
|
||||
static inline void skip_syscall_args(va_list ap) {
|
||||
const char* arg_type = va_arg(ap, const char*);
|
||||
|
||||
if (strcmp_static(arg_type, "const char *"))
|
||||
if (strcmp_static(arg_type, "const char *") || strcmp_static(arg_type, "const char*"))
|
||||
va_arg(ap, const char*);
|
||||
else if (is_pointer(arg_type))
|
||||
va_arg(ap, void*);
|
||||
|
||||
Reference in New Issue
Block a user