Skip to content

Commit

Permalink
Fix format strings on 64 bit machine.
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Chorbadzhiyski committed Feb 2, 2015
1 parent 8111eb9 commit 6aae193
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions output_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <sys/time.h>
#include <errno.h>
#include <math.h>
#include <inttypes.h>

#include "libfuncs/io.h"
#include "libfuncs/log.h"
Expand Down Expand Up @@ -75,7 +76,7 @@ void ts_frame_process(CONFIG *conf, OUTPUT *o, uint8_t *data) {
if (conf->debug) {
uint64_t ts_rate = (double)(((bytes - old_bytes) * 8) * 27000000) / (pcr - old_org_pcr);
uint64_t ts_rate_new = (double)(((bytes - old_bytes) * 8) * 27000000) / (new_pcr - old_pcr);
LOGf("PCR[%03x]: old:%14llu new:%14llu pcr_diff:%8lld ts_rate:%9llu ts_rate_new:%9llu diff:%9lld | passed:%llu\n",
LOGf("PCR[%03x]: old:%14" PRIu64 " new:%14" PRIu64 " pcr_diff:%8" PRId64 " ts_rate:%9" PRIu64 " ts_rate_new:%9" PRIu64 " diff:%9" PRId64 " | passed:%" PRIu64 "\n",
pid,
pcr,
new_pcr,
Expand Down Expand Up @@ -147,7 +148,7 @@ void * output_handle_write(void *_config) {
double opadding = ((double)o->padding_period / o->traffic_period) * 100;

if (!conf->quiet) {
LOGf("STAT : Pad:%6.2f%% Traf:%5.2f Mbps | %8.2f | %7llu\n",
LOGf("STAT : Pad:%6.2f%% Traf:%5.2f Mbps | %8.2f | %7" PRIu64 "\n",
opadding,
out_mbps,
out_kbps,
Expand Down

0 comments on commit 6aae193

Please sign in to comment.