]> git.eshelyaron.com Git - emacs.git/commitdiff
src/image.c (compute_image_size): Remove superfluous checks.
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 15 Jul 2017 01:21:07 +0000 (03:21 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 15 Jul 2017 01:21:07 +0000 (03:21 +0200)
* src/image.c (compute_image_size): Remove superfluous checks.

src/image.c

index 69a529e8c355178fe31194851ad89a1a8661511c..76a19a68b0ddd75e5d22df1faecc8ed10c07d84d 100644 (file)
@@ -8129,10 +8129,10 @@ compute_image_size (size_t width, size_t height,
   width = width * scale;
   height = height * scale;
 
-  if (desired_width != -1 && desired_height == -1)
+  if (desired_width != -1)
     /* Width known, calculate height. */
     desired_height = scale_image_size (desired_width, width, height);
-  else if (desired_width == -1 && desired_height != -1)
+  else if (desired_height != -1)
     /* Height known, calculate width. */
     desired_width = scale_image_size (desired_height, height, width);
   else