Skip to content
Snippets Groups Projects
Commit cae7be1a authored by Zi Shen Lim's avatar Zi Shen Lim
Browse files

mnexec: getopt bugfix

getopt returns an 'int', so use change datatype of 'c' to match it.
Otherwise, 'c' may hold a value of 255 (0xff), and fail the comparison
with -1 (0xffffffff): while ((c = getopt(...)) != -1)

This bug was uncovered on Ubuntu 13.04 running on ARM, using
arm-linux-gnueabihf-gcc4.7.
parent 4ccfe242
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ int cgroup(char *gname)
int main(int argc, char *argv[])
{
char c;
int c;
int fd;
char path[PATH_MAX];
int nsid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment