Skip to content

Commit

Permalink
Fix casts with const pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwagner committed Dec 21, 2014
1 parent d105d4f commit 9e2ec24
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nacl_irt_interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ static inline int nacl_startup_argc(const uint32_t info[]) {
return info[NACL_STARTUP_ARGC];
}

static inline char **nacl_startup_argv(const uint32_t *info) {
return (char **) &info[NACL_STARTUP_ARGV];
static inline char* const *nacl_startup_argv(const uint32_t *info) {
return (char* const*) &info[NACL_STARTUP_ARGV];
}

static inline int nacl_startup_envc(const uint32_t info[]) {
return info[NACL_STARTUP_ENVC];
}

static inline char **nacl_startup_envp(const uint32_t *info) {
static inline char* const *nacl_startup_envp(const uint32_t *info) {
return &nacl_startup_argv(info)[nacl_startup_argc(info) + 1];
}

static inline Elf32_auxv_t *nacl_startup_auxv(const uint32_t *info) {
char **envend = &nacl_startup_envp(info)[nacl_startup_envc(info) + 1];
return (Elf32_auxv_t *) envend;
static inline const Elf32_auxv_t *nacl_startup_auxv(const uint32_t *info) {
char* const* envend = &nacl_startup_envp(info)[nacl_startup_envc(info) + 1];
return (const Elf32_auxv_t *) envend;
}

#endif

0 comments on commit 9e2ec24

Please sign in to comment.