From: Eric Haszlakiewicz Date: Fri, 15 Jun 2018 02:24:15 +0000 (-0400) Subject: Issue #418: Fix docs for json_util_from_fd and json_util_from_file to say that they... X-Git-Tag: json-c-0.14-20200419~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3752b58945d23895535857ed136a5185bad02ce;p=thirdparty%2Fjson-c.git Issue #418: Fix docs for json_util_from_fd and json_util_from_file to say that they return NULL on failures. --- diff --git a/json_util.h b/json_util.h index e065f60c..3e1b2947 100644 --- a/json_util.h +++ b/json_util.h @@ -38,7 +38,7 @@ extern "C" { * Read the full contents of the given file, then convert it to a * json_object using json_tokener_parse(). * - * Returns -1 if something fails. See json_util_get_last_err() for details. + * Returns NULL on failure. See json_util_get_last_err() for details. */ extern struct json_object* json_object_from_file(const char *filename); @@ -50,7 +50,7 @@ extern struct json_object* json_object_from_file(const char *filename); * Note, that the fd must be readable at the actual position, i.e. * use lseek(fd, 0, SEEK_SET) before. * - * Returns -1 if something fails. See json_util_get_last_err() for details. + * Returns NULL on failure. See json_util_get_last_err() for details. */ extern struct json_object* json_object_from_fd(int fd);