diff options
Diffstat (limited to 'lib/json.c')
| -rw-r--r-- | lib/json.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/json.c b/lib/json.c index 7164889e4a..40b6aadaa3 100644 --- a/lib/json.c +++ b/lib/json.c @@ -13,10 +13,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <zebra.h> @@ -34,7 +33,7 @@ int use_json(const int argc, struct cmd_token *argv[]) if (argc == 0) return 0; - if (argv[argc - 1]->arg && strcmp(argv[argc - 1]->arg, "json") == 0) + if (argv[argc - 1]->arg && strmatch(argv[argc - 1]->text, "json")) return 1; return 0; @@ -46,12 +45,7 @@ void json_object_string_add(struct json_object *obj, const char *key, json_object_object_add(obj, key, json_object_new_string(s)); } -void json_object_int_add(struct json_object *obj, const char *key, int32_t i) -{ - json_object_object_add(obj, key, json_object_new_int(i)); -} - -void json_object_long_add(struct json_object *obj, const char *key, int64_t i) +void json_object_int_add(struct json_object *obj, const char *key, int64_t i) { #if defined(HAVE_JSON_C_JSON_H) json_object_object_add(obj, key, json_object_new_int64(i)); |
