Apply modernize-use-nullptr
Setup: - `mkdir tidy; cd tidy` - `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` - `cd ..` - `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
This commit is contained in:
@@ -180,7 +180,7 @@ read_icc_profile (j_decompress_ptr cinfo,
|
||||
unsigned int data_length[MAX_SEQ_NO + 1]; /* size of profile data in marker */
|
||||
unsigned int data_offset[MAX_SEQ_NO + 1]; /* offset for data in marker */
|
||||
|
||||
*icc_data_ptr = NULL; /* avoid confusion if FALSE return */
|
||||
*icc_data_ptr = nullptr; /* avoid confusion if FALSE return */
|
||||
*icc_data_len = 0;
|
||||
|
||||
/* This first pass over the saved markers discovers whether there are
|
||||
@@ -191,7 +191,7 @@ read_icc_profile (j_decompress_ptr cinfo,
|
||||
marker_present[seq_no] = 0;
|
||||
}
|
||||
|
||||
for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) {
|
||||
for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) {
|
||||
if (marker_is_icc(marker)) {
|
||||
if (num_markers == 0) {
|
||||
num_markers = GETJOCTET(marker->data[13]);
|
||||
@@ -236,12 +236,12 @@ read_icc_profile (j_decompress_ptr cinfo,
|
||||
/* Allocate space for assembled data */
|
||||
icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET));
|
||||
|
||||
if (icc_data == NULL) {
|
||||
if (icc_data == nullptr) {
|
||||
return FALSE; /* oops, out of memory */
|
||||
}
|
||||
|
||||
/* and fill it in */
|
||||
for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) {
|
||||
for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) {
|
||||
if (marker_is_icc(marker)) {
|
||||
JOCTET FAR *src_ptr;
|
||||
JOCTET *dst_ptr;
|
||||
|
Reference in New Issue
Block a user