]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - lib/json_print.c
Tree wide: Drop sockaddr_nl arg
[mirror_iproute2.git] / lib / json_print.c
index 77902824a7386bf617bace5be8bec9cfd379f6da..f7ef41c1570f2a72eacd213e278193036b3dc561 100644 (file)
@@ -172,12 +172,12 @@ void print_color_0xhex(enum output_type type,
                       enum color_attr color,
                       const char *key,
                       const char *fmt,
-                      unsigned int hex)
+                      unsigned long long hex)
 {
        if (_IS_JSON_CONTEXT(type)) {
                SPRINT_BUF(b1);
 
-               snprintf(b1, sizeof(b1), "%#x", hex);
+               snprintf(b1, sizeof(b1), "%#llx", hex);
                print_string(PRINT_JSON, key, NULL, b1);
        } else if (_IS_FP_CONTEXT(type)) {
                color_fprintf(stdout, color, fmt, hex);
@@ -222,3 +222,10 @@ void print_color_null(enum output_type type,
                color_fprintf(stdout, color, fmt, value);
        }
 }
+
+/* Print line seperator (if not in JSON mode) */
+void print_nl(void)
+{
+       if (!_jw)
+               printf("%s", _SL_);
+}