getopt return value changed from char to int (https://github.com/clicon/clixon/issues/58)

This commit is contained in:
Olof hagsand 2018-12-01 18:34:52 +01:00
parent 39a5086218
commit d09a8c08aa
12 changed files with 17 additions and 14 deletions

View file

@ -12,7 +12,7 @@
* Support of submodule, include and belongs-to. * Support of submodule, include and belongs-to.
* Openconfig yang specs parsed: https://github.com/openconfig/public * Openconfig yang specs parsed: https://github.com/openconfig/public
* Improved unknown handling * Improved unknown handling
* `CLICON_YANG_DIR` is changed from a single directory to a path of directories * Configure option `CLICON_YANG_DIR` is changed from a single directory to a path of directories
* Note CLIXON_DATADIR (=/usr/local/share/clixon) need to be in the list * Note CLIXON_DATADIR (=/usr/local/share/clixon) need to be in the list
### API changes on existing features (you may need to change your code) ### API changes on existing features (you may need to change your code)
@ -26,7 +26,10 @@
* Syntactically Correct handling of '<?' (processing instructions) and '<?xml' (XML declaration) * Syntactically Correct handling of '<?' (processing instructions) and '<?xml' (XML declaration)
* XML prolog syntax for 'well-formed' XML * XML prolog syntax for 'well-formed' XML
* <!DOCTYPE (ie DTD) is not supported. * <!DOCTYPE (ie DTD) is not supported.
### Corrected Bugs ### Corrected Bugs
* getopt return value changed from char to int (https://github.com/clicon/clixon/issues/58)
### Known issues ### Known issues
## 3.8.0 (6 Nov 2018) ## 3.8.0 (6 Nov 2018)

View file

@ -504,7 +504,7 @@ main(int argc,
char **argv) char **argv)
{ {
int retval = -1; int retval = -1;
char c; int c;
int zap; int zap;
int foreground; int foreground;
int once; int once;

View file

@ -240,7 +240,7 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int retval = -1; int retval = -1;
char c; int c;
int once; int once;
char *tmp; char *tmp;
char *argv0 = argv[0]; char *argv0 = argv[0];

View file

@ -330,7 +330,7 @@ int
main(int argc, main(int argc,
char **argv) char **argv)
{ {
char c; int c;
char *tmp; char *tmp;
char *argv0 = argv[0]; char *argv0 = argv[0];
int quiet = 0; int quiet = 0;

View file

@ -513,7 +513,7 @@ main(int argc,
char *argv0 = argv[0]; char *argv0 = argv[0];
FCGX_Request request; FCGX_Request request;
FCGX_Request *r = &request; FCGX_Request *r = &request;
char c; int c;
char *sockpath; char *sockpath;
char *path; char *path;
clicon_handle h; clicon_handle h;

View file

@ -107,7 +107,7 @@ usage(char *argv0)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
char c; int c;
clicon_handle h; clicon_handle h;
char *argv0; char *argv0;
char *db = "running"; char *db = "running";

View file

@ -289,7 +289,7 @@ example_restconf_start(clicon_handle h,
int argc, int argc,
char **argv) char **argv)
{ {
char c; int c;
clicon_debug(1, "%s argc:%d", __FUNCTION__, argc); clicon_debug(1, "%s argc:%d", __FUNCTION__, argc);
optind = 1; optind = 1;

View file

@ -28,7 +28,7 @@ usage(char *argv0)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int i; int i;
cxobj **xv; cxobj **xv;
cxobj *x; cxobj *x;
cxobj *xn; cxobj *xn;
@ -42,7 +42,7 @@ main(int argc, char **argv)
char *buf; char *buf;
char *p; char *p;
int retval; int retval;
char c; int c;
while ((c = getopt(argc, argv, "?hbj")) != -1) while ((c = getopt(argc, argv, "?hbj")) != -1)
switch (c) { switch (c) {

View file

@ -218,7 +218,7 @@ main(int argc, char **argv)
int timeout = 10; int timeout = 10;
char start[27] = {0,}; /* strlen = 0 */ char start[27] = {0,}; /* strlen = 0 */
char stop[27] = {0,}; char stop[27] = {0,};
char c; int c;
char *argv0 = argv[0]; char *argv0 = argv[0];
struct timeval now; struct timeval now;

View file

@ -85,7 +85,7 @@ main(int argc,
cxobj *xc; cxobj *xc;
cbuf *cb = cbuf_new(); cbuf *cb = cbuf_new();
int retval = -1; int retval = -1;
char c; int c;
int logdst = CLICON_LOG_STDERR; int logdst = CLICON_LOG_STDERR;
optind = 1; optind = 1;

View file

@ -119,7 +119,7 @@ main(int argc, char **argv)
cxobj **xv = NULL; cxobj **xv = NULL;
cxobj *x0 = NULL; cxobj *x0 = NULL;
cxobj *x; cxobj *x;
char c; int c;
int len; int len;
char *buf = NULL; char *buf = NULL;
int ret; int ret;

View file

@ -81,8 +81,8 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
yang_spec *yspec = NULL; yang_spec *yspec = NULL;
char c; int c;
int logdst = CLICON_LOG_STDERR; int logdst = CLICON_LOG_STDERR;
optind = 1; optind = 1;
opterr = 0; opterr = 0;