imv-attestation: Use proper cast for length when using %.*s
authorTobias Brunner <tobias@strongswan.org>
Wed, 24 Jul 2013 07:04:09 +0000 (09:04 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 24 Jul 2013 08:54:47 +0000 (10:54 +0200)
src/libpts/plugins/imv_attestation/attest_db.c

index c8769e9..e55aa14 100644 (file)
@@ -1556,8 +1556,8 @@ METHOD(attest_db_t, list_sessions, void,
                        identity = identity.len ? identity : chunk_from_str("-");
                        printf("%4d: %T %2d %-20s %.*s%*s%.*s - %N\n", session_id, &created,
                                   FALSE, conn_id, product, device_len, device,
                        identity = identity.len ? identity : chunk_from_str("-");
                        printf("%4d: %T %2d %-20s %.*s%*s%.*s - %N\n", session_id, &created,
                                   FALSE, conn_id, product, device_len, device,
-                                  DEVICE_MAX_LEN - device_len + 1, " ", identity.len, identity.ptr,
-                                  TNC_IMV_Action_Recommendation_names, rec);
+                                  DEVICE_MAX_LEN - device_len + 1, " ", (int)identity.len,
+                                  identity.ptr, TNC_IMV_Action_Recommendation_names, rec);
                }
                e->destroy(e);
        }
                }
                e->destroy(e);
        }