{
gchar *name = dir->d_name;
- if (!(name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0'))) )
+ if (name[0] != '.' || (name[1] != '\0' && (name[1] != '.' || name[2] != '\0')) )
{
closedir(dp);
return FALSE;
* FIXME: what exactly is this test trying to do?
* ok, so this test is to allow the case of swapped signed/unsigned mismatch to leak through?
*/
- if (!(marker->format == EXIF_FORMAT_RATIONAL_UNSIGNED && format == EXIF_FORMAT_RATIONAL) &&
- !(marker->format == EXIF_FORMAT_RATIONAL && format == EXIF_FORMAT_RATIONAL_UNSIGNED) &&
+ if ((marker->format != EXIF_FORMAT_RATIONAL_UNSIGNED || format != EXIF_FORMAT_RATIONAL) &&
+ (marker->format != EXIF_FORMAT_RATIONAL || format != EXIF_FORMAT_RATIONAL_UNSIGNED) &&
/* short fits into a long so allow this mismatch
* as well (some tags allowed to be unsigned short _or_ unsigned long)
*/
- !(marker->format == EXIF_FORMAT_LONG_UNSIGNED && format == EXIF_FORMAT_SHORT_UNSIGNED) )
+ (marker->format != EXIF_FORMAT_LONG_UNSIGNED || format != EXIF_FORMAT_SHORT_UNSIGNED) )
{
if (format < EXIF_FORMAT_COUNT)
{
{
/* we ignore the .thumbnails dir for cleanliness */
if (dirs &&
- !(name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0'))) &&
+ (name[0] != '.' || (name[1] != '\0' && (name[1] != '.' || name[2] != '\0'))) &&
strcmp(name, GQ_CACHE_LOCAL_THUMB) != 0 &&
strcmp(name, GQ_CACHE_LOCAL_METADATA) != 0 &&
strcmp(name, THUMB_FOLDER_LOCAL) != 0)
list_count = g_list_position(hd->list, g_list_last(hd->list)) + 1;
while (work && secsave_errno == SS_ERR_NONE)
{
- if ((!(strcmp(hd->key, "path_list") == 0 && list_count > options->open_recent_list_maxsize))
+ if ((strcmp(hd->key, "path_list") != 0 || list_count <= options->open_recent_list_maxsize)
&&
- (!(strcmp(hd->key, "recent") == 0 && (!isfile(static_cast<const gchar *>(work->data)))))
+ (strcmp(hd->key, "recent") != 0 || !(!isfile(static_cast<const gchar *>(work->data))))
&&
- (!(strcmp(hd->key, "image_list") == 0 && list_count > options->recent_folder_image_list_maxsize)))
+ (strcmp(hd->key, "image_list") != 0 || list_count <= options->recent_folder_image_list_maxsize))
{
secure_fprintf(ssi, "\"%s\"\n", static_cast<gchar *>(work->data));
}
{
/* Both exiv2 and libraw sometimes return a pointer to a file
* section that is not a jpeg */
- if (!(il->mapped_file[0] == 0xFF && il->mapped_file[1] == 0xD8))
+ if (il->mapped_file[0] != 0xFF || il->mapped_file[1] != 0xD8)
{
il->mapped_file = nullptr;
}
{
/* Both exiv2 and libraw sometimes return a pointer to a file
* section that is not a jpeg */
- if (!(il->mapped_file[0] == 0xFF && il->mapped_file[1] == 0xD8))
+ if (il->mapped_file[0] != 0xFF || il->mapped_file[1] != 0xD8)
{
il->mapped_file = nullptr;
}
}
}
- if (imd->image_fd == fd_n && !(options->metadata.write_orientation && !options->image.exif_rotate_enable))
+ if (imd->image_fd == fd_n && (!options->metadata.write_orientation || options->image.exif_rotate_enable))
{
imd->orientation = orientation;
pixbuf_renderer_set_orientation(reinterpret_cast<PixbufRenderer *>(imd->pr), orientation);
while (TRUE)
{
- if (!(exclude_sibling && sibling && keyword_compare(keyword_tree, &iter, sibling) == 0))
+ if (!exclude_sibling || !sibling || keyword_compare(keyword_tree, &iter, sibling) != 0)
{
if (options->metadata.keywords_case_sensitive)
{
x2 = pr->x_scroll + pr->vis_width;
y2 = pr->y_scroll + pr->vis_height;
- return !(static_cast<gdouble>(st->x) * pr->scale > static_cast<gdouble>(x2) ||
- static_cast<gdouble>(st->x + pr->source_tile_width) * pr->scale < static_cast<gdouble>(x1) ||
- static_cast<gdouble>(st->y) * pr->scale > static_cast<gdouble>(y2) ||
- static_cast<gdouble>(st->y + pr->source_tile_height) * pr->scale < static_cast<gdouble>(y1));
+ return static_cast<gdouble>(st->x) * pr->scale <= static_cast<gdouble>(x2) &&
+ static_cast<gdouble>(st->x + pr->source_tile_width) * pr->scale >= static_cast<gdouble>(x1) &&
+ static_cast<gdouble>(st->y) * pr->scale <= static_cast<gdouble>(y2) &&
+ static_cast<gdouble>(st->y + pr->source_tile_height) * pr->scale >= static_cast<gdouble>(y1);
}
static SourceTile *pr_source_tile_new(PixbufRenderer *pr, gint x, gint y)
sd->search_lat = 1000;
sd->search_lon = 1000;
sscanf(entry_text," %lf %lf ", &sd->search_lat, &sd->search_lon );
- if (!(entry_text != nullptr && !g_strstr_len(entry_text, -1, "Error") &&
- sd->search_lat >= -90 && sd->search_lat <= 90 &&
- sd->search_lon >= -180 && sd->search_lon <= 180))
+ if (entry_text == nullptr || g_strstr_len(entry_text, -1, "Error") ||
+ sd->search_lat < -90 || sd->search_lat > 90 ||
+ sd->search_lon < -180 || sd->search_lon > 180)
{
file_util_warning_dialog(_(
"Entry does not contain a valid lat/long value"),