From: erickson Date: Mon, 27 Feb 2006 15:31:26 +0000 (+0000) Subject: small changes, fixed some typos X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d29f9eee5c7c0868ebaae921c56a37d042c0f2ee;p=opensrf%2Fbjwebb.git small changes, fixed some typos git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@647 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/objson/json_parser.c b/src/objson/json_parser.c index 69fb779..337d30f 100644 --- a/src/objson/json_parser.c +++ b/src/objson/json_parser.c @@ -160,7 +160,7 @@ int json_parse_json_null(char* string, unsigned long* index, jsonObject* obj) { if(*index >= (current_strlen - 3)) { return json_handle_error(string, index, - "_parse_json_string(): invalid null" ); + "_parse_json_null(): invalid null" ); } if(!strncasecmp(string + (*index), "null", 4)) { @@ -169,7 +169,7 @@ int json_parse_json_null(char* string, unsigned long* index, jsonObject* obj) { return 0; } else { return json_handle_error(string, index, - "_parse_json_string(): invalid null" ); + "_parse_json_null(): invalid null" ); } } diff --git a/src/objson/object.c b/src/objson/object.c index 5d73642..fa50b6f 100644 --- a/src/objson/object.c +++ b/src/objson/object.c @@ -648,12 +648,13 @@ jsonObject* jsonObjectFindPath( const jsonObject* obj, char* format, ...) { char* buf = VA_BUF; /* tmp storage for strtok_r */ - char tokbuf[len]; - bzero(tokbuf, len); + //char tokbuf[len]; + //bzero(tokbuf, len); char* token = NULL; char* t = buf; - char* tt = tokbuf; + //char* tt = tokbuf; + char* tt; /* strtok storage */ /* copy the path before strtok_r destroys it */ char* pathcopy = strdup(buf); diff --git a/src/utils/utils.h b/src/utils/utils.h index 999d608..f7226dd 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -33,18 +33,18 @@ GNU General Public License for more details. /* turns a va_list into a string */ #define VA_LIST_TO_STRING(x) \ - unsigned long len = 0;\ + unsigned long __len = 0;\ va_list args; \ va_list a_copy;\ va_copy(a_copy, args); \ va_start(args, x); \ - len = vsnprintf(NULL, 0, x, args); \ + __len = vsnprintf(NULL, 0, x, args); \ va_end(args); \ - len += 2; \ - char _b[len]; \ - bzero(_b, len); \ + __len += 2; \ + char _b[__len]; \ + bzero(_b, __len); \ va_start(a_copy, x); \ - vsnprintf(_b, len - 1, x, a_copy); \ + vsnprintf(_b, __len - 1, x, a_copy); \ va_end(a_copy); \ char* VA_BUF = _b; \