Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s/std::snprintf/snprintf #2308

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions utilities/blob_db/blob_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// of patent rights can be found in the PATENTS file in the same directory.
#ifndef ROCKSDB_LITE

#include <stdio.h>
#include <chrono>
#include <cinttypes>
#include <cstdio>
#include <memory>
#include "utilities/blob_db/blob_db_impl.h"

Expand Down Expand Up @@ -89,17 +89,17 @@ std::shared_ptr<Reader> BlobFile::OpenSequentialReader(

std::string BlobFile::DumpState() const {
char str[1000];
std::snprintf(str, sizeof(str),
"path: %s fn: %" PRIu64 " blob_count: %" PRIu64
" gc_epoch: %" PRIu64 " file_size: %" PRIu64
" deleted_count: %" PRIu64 " deleted_size: %" PRIu64
" closed: %d can_be_deleted: %d ttl_range: (%d, %d)"
" sn_range: (%" PRIu64 " %" PRIu64 "), writer: %d reader: %d",
path_to_dir_.c_str(), file_number_, blob_count_.load(),
gc_epoch_.load(), file_size_.load(), deleted_count_,
deleted_size_, closed_.load(), can_be_deleted_.load(),
ttl_range_.first, ttl_range_.second, sn_range_.first,
sn_range_.second, (!!log_writer_), (!!ra_file_reader_));
snprintf(str, sizeof(str),
"path: %s fn: %" PRIu64 " blob_count: %" PRIu64 " gc_epoch: %" PRIu64
" file_size: %" PRIu64 " deleted_count: %" PRIu64
" deleted_size: %" PRIu64
" closed: %d can_be_deleted: %d ttl_range: (%d, %d)"
" sn_range: (%" PRIu64 " %" PRIu64 "), writer: %d reader: %d",
path_to_dir_.c_str(), file_number_, blob_count_.load(),
gc_epoch_.load(), file_size_.load(), deleted_count_, deleted_size_,
closed_.load(), can_be_deleted_.load(), ttl_range_.first,
ttl_range_.second, sn_range_.first, sn_range_.second,
(!!log_writer_), (!!ra_file_reader_));
return str;
}

Expand Down