]> git.proxmox.com Git - mirror_lxc.git/commit
lxc-clone: proper type for getopt_long result
authorBogdan Purcareata <bogdan.purcareata@freescale.com>
Mon, 9 Dec 2013 14:39:46 +0000 (16:39 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 9 Dec 2013 19:59:05 +0000 (14:59 -0500)
commitd2bf794591e47bbc2b66a2921440e9e0f0518359
tree77cc74fa585550f066a9ad42e8fe645cae48a9bf
parent359c71b65fa11c9e6079f491204b4c286c539278
lxc-clone: proper type for getopt_long result

While char is a signed type and should have no trouble
storing a "-1" value, getopt_long() will return a value of 255
instead of -1. This has been noticed on powerpc; there's also
some upstream talk about it at [1].

Change variable type from char to int, since it's also the
documented use.

[1] http://stackoverflow.com/questions/17070958/c-why-does-getopt-return-255-on-linux

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_clone.c