]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use correct parameter name : rename 'value' to 'key'.
authorhouranled <leegit@163.com>
Thu, 25 Sep 2025 09:50:51 +0000 (17:50 +0800)
committerhouranled <leegit@163.com>
Thu, 25 Sep 2025 09:50:51 +0000 (17:50 +0800)
cups/json.c
cups/json.h

index dae2a86ce920b61685450c4be392a757fd9a5751..584d3f27a129bb80c430b77e17e788f431599453 100644 (file)
@@ -1361,10 +1361,10 @@ cupsJSONNew(cups_json_t  *parent,       // I - Parent JSON node or `NULL` for a root n
 cups_json_t *                          // O - JSON node
 cupsJSONNewKey(cups_json_t *parent,    // I - Parent JSON node or `NULL` for a root node
               cups_json_t  *after,     // I - Previous sibling node or `NULL` to append to the end
-               const char  *value)     // I - Key string
+               const char  *key)       // I - Key string
 {
   cups_json_t  *node;                  // JSON node
-  char         *s = strdup(value);     // Key string
+  char         *s = strdup(key);       // Key string
 
 
   if (!s)
index 699500727bc0b8a531a4bb616ebad1da30a1ec28..df7bad6350ddd6486b40d63a9737990429f57c40 100644 (file)
@@ -61,7 +61,7 @@ extern cups_json_t    *cupsJSONImportString(const char *s) _CUPS_PUBLIC;
 extern cups_json_t     *cupsJSONImportURL(const char *url, time_t *last_modified) _CUPS_PUBLIC;
 
 extern cups_json_t     *cupsJSONNew(cups_json_t *parent, cups_json_t *after, cups_jtype_t type) _CUPS_PUBLIC;
-extern cups_json_t     *cupsJSONNewKey(cups_json_t *parent, cups_json_t *after, const char *value) _CUPS_PUBLIC;
+extern cups_json_t     *cupsJSONNewKey(cups_json_t *parent, cups_json_t *after, const char *key) _CUPS_PUBLIC;
 extern cups_json_t     *cupsJSONNewNumber(cups_json_t *parent, cups_json_t *after, double number) _CUPS_PUBLIC;
 extern cups_json_t     *cupsJSONNewString(cups_json_t *parent, cups_json_t *after, const char *value) _CUPS_PUBLIC;