Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-11644 ptlrpc: show target name in req_history
[fs/lustre-release.git]
/
lustre
/
utils
/
liblustreapi_json.c
diff --git
a/lustre/utils/liblustreapi_json.c
b/lustre/utils/liblustreapi_json.c
index
809c6ec
..
e19f25f
100644
(file)
--- a/
lustre/utils/liblustreapi_json.c
+++ b/
lustre/utils/liblustreapi_json.c
@@
-3,7
+3,7
@@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- *
(C) Copyright 2014
Intel Corporation.
+ *
Copyright (c) 2014,
Intel Corporation.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
@@
-276,7
+276,7
@@
int llapi_json_add_item(struct llapi_json_item_list **json_items,
if (new_item->lji_key == NULL)
return -ENOMEM;
if (new_item->lji_key == NULL)
return -ENOMEM;
- s
trlcpy(new_item->lji_key, key, len
);
+ s
nprintf(new_item->lji_key, len, "%s", key
);
new_item->lji_type = type;
new_item->lji_next = NULL;
new_item->lji_type = type;
new_item->lji_next = NULL;
@@
-295,7
+295,7
@@
int llapi_json_add_item(struct llapi_json_item_list **json_items,
new_item->lji_string = calloc(len, sizeof(char));
if (new_item->lji_string == NULL)
return -ENOMEM;
new_item->lji_string = calloc(len, sizeof(char));
if (new_item->lji_string == NULL)
return -ENOMEM;
- s
trlcpy(new_item->lji_string, (char *)val, len
);
+ s
nprintf(new_item->lji_string, len, "%s", (char *)val
);
break;
default:
llapi_err_noerrno(LLAPI_MSG_ERROR, "Unknown JSON type: %d",
break;
default:
llapi_err_noerrno(LLAPI_MSG_ERROR, "Unknown JSON type: %d",