diff --git a/cmdline/check.c b/cmdline/check.c index 8ca21b31..a3f3a4db 100644 --- a/cmdline/check.c +++ b/cmdline/check.c @@ -1129,7 +1129,7 @@ static int state_check_process(struct snapraid_state* state, int fix, struct sna ++failed_count; log_tag("%s:%u:%s:%s: Open error at position %u. %s.\n", es(errno), i, disk->name, esc_tag(file->sub, esc_buffer), file_pos, strerror(errno)); - + if (errno == EIO) { ++io_error; } else { @@ -2120,7 +2120,7 @@ int state_check(struct snapraid_state* state, int fix, block_off_t blockstart, b if (errno == EIO) { log_fatal_errno(errno, lev_config_name(l)); exit(EXIT_FAILURE); - } + } /* continue anyway */ parity_ptr[l] = 0; diff --git a/cmdline/device.c b/cmdline/device.c index 25264257..72042a6a 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -461,7 +461,7 @@ static double smart_afr(uint64_t* smart, const char* model) } /** - * Calculates the probability of at least one failure occurring + * Calculates the probability of at least one failure occurring * within a year using a Poisson distribution. * * @param afr The aggregate Annual Failure Rate (lambda). diff --git a/cmdline/portable.h b/cmdline/portable.h index 1dc635bc..0a8edd93 100644 --- a/cmdline/portable.h +++ b/cmdline/portable.h @@ -454,7 +454,7 @@ int randomize(void* ptr, size_t size); /** * Unified Wear Level Metric (0-100) * - * Represents the remaining life of an SSD. + * Represents the remaining life of an SSD. * - 0: Brand new drive (0% wear). * - 100: Drive has reached or exceeded its manufacturer-rated design life. */ diff --git a/cmdline/support.c b/cmdline/support.c index c14b3148..f9cc6218 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -1812,8 +1812,8 @@ int smartctl_attribute(FILE* f, const char* file, const char* name, uint64_t* sm smart[id] = raw; - /* - * Map normalized health percentage to our unified wear level for SSDs + /* + * Map normalized health percentage to our unified wear level for SSDs * 177: Wear_Leveling_Count (Samsung/Crucial) * 231: SSD_Life_Left (Kingston/WD) * 233: Media_Wearout_Indicator (Intel) diff --git a/cmdline/unix.c b/cmdline/unix.c index 47acc4ee..36b2e19a 100644 --- a/cmdline/unix.c +++ b/cmdline/unix.c @@ -607,11 +607,11 @@ static int devuuid_darwin(const char* path, char* uuid, size_t uuid_size) *uuid = 0; path_apple = CFStringCreateWithCString(kCFAllocatorDefault, path, kCFStringEncodingUTF8); - if (!path_apple) + if (!path_apple) goto bail; session = DASessionCreate(kCFAllocatorDefault); - if (!session) + if (!session) goto bail; path_appler = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_apple, kCFURLPOSIXPathStyle, false); @@ -645,7 +645,7 @@ static int devuuid_darwin(const char* path, char* uuid, size_t uuid_size) if (description) { /* key might not exist for NTFS/ExFAT on some drivers */ const void* value = (CFUUIDRef)CFDictionaryGetValue(description, kDADiskDescriptionVolumeUUIDKey); - CFStringRef uuid_string = NULL; + CFStringRef uuid_string = NULL; if (value) { if (CFGetTypeID(value) == CFUUIDGetTypeID()) {