summaryrefslogtreecommitdiff
path: root/lib/audit_logging/audit_logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/audit_logging/audit_logging.c')
-rw-r--r--lib/audit_logging/audit_logging.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/audit_logging/audit_logging.c b/lib/audit_logging/audit_logging.c
index 43acf9512c9..3ab14b2a187 100644
--- a/lib/audit_logging/audit_logging.c
+++ b/lib/audit_logging/audit_logging.c
@@ -385,31 +385,33 @@ bool json_is_invalid(const struct json_object *object)
* -1 the operation failed
*
*/
-int json_add_int(struct json_object *object, const char *name, const int value)
+int json_add_int(struct json_object *object, const char *name, const json_int_t value)
{
int ret = 0;
json_t *integer = NULL;
if (json_is_invalid(object)) {
- DBG_ERR("Unable to add int [%s] value [%d], "
+ DBG_ERR("Unable to add int [%s] value [%jd], "
"target object is invalid\n",
name,
- value);
+ (intmax_t)value);
return JSON_ERROR;
}
integer = json_integer(value);
if (integer == NULL) {
- DBG_ERR("Unable to create integer value [%s] value [%d]\n",
+ DBG_ERR("Unable to create integer value [%s] value [%jd]\n",
name,
- value);
+ (intmax_t)value);
return JSON_ERROR;
}
ret = json_object_set_new(object->root, name, integer);
if (ret != 0) {
json_decref(integer);
- DBG_ERR("Unable to add int [%s] value [%d]\n", name, value);
+ DBG_ERR("Unable to add int [%s] value [%jd]\n",
+ name,
+ (intmax_t)value);
}
return ret;
}