Commit 5adc46d1 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

sprintf format: pid_t need not be an int.

parent 661dd2c6
...@@ -8303,13 +8303,10 @@ int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx) ...@@ -8303,13 +8303,10 @@ int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx)
mr = env->me_txns->mti_readers; mr = env->me_txns->mti_readers;
for (i=0; i<rdrs; i++) { for (i=0; i<rdrs; i++) {
if (mr[i].mr_pid) { if (mr[i].mr_pid) {
size_t tid; txnid_t txnid = mr[i].mr_txnid;
tid = mr[i].mr_tid; sprintf(buf, txnid == (txnid_t)-1 ?
if (mr[i].mr_txnid == (txnid_t)-1) { "%10d %"Z"x -\n" : "%10d %"Z"x %"Z"u\n",
sprintf(buf, "%10d %"Z"x -\n", mr[i].mr_pid, tid); (int)mr[i].mr_pid, (size_t)mr[i].mr_tid, txnid);
} else {
sprintf(buf, "%10d %"Z"x %"Z"u\n", mr[i].mr_pid, tid, mr[i].mr_txnid);
}
if (first) { if (first) {
first = 0; first = 0;
rc = func(" pid thread txnid\n", ctx); rc = func(" pid thread txnid\n", ctx);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment