-proper branch order
authorChristian Grothoff <christian@grothoff.org>
Fri, 4 May 2012 07:49:36 +0000 (07:49 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 4 May 2012 07:49:36 +0000 (07:49 +0000)
src/util/crypto_aes.c

index 7d14131be73a1bd3beb3eb14de2608a77ff94f1b..d5c36d703f619675fd9e41efbdc3844644bd2111 100644 (file)
@@ -59,10 +59,12 @@ GNUNET_CRYPTO_aes_check_session_key (const struct GNUNET_CRYPTO_AesSessionKey
   uint32_t crc;
 
   crc = GNUNET_CRYPTO_crc32_n (key, GNUNET_CRYPTO_AES_KEY_LENGTH);
-  if (ntohl (key->crc32) == crc)
-    return GNUNET_OK;
-  GNUNET_break_op (0);
-  return GNUNET_SYSERR;
+  if (ntohl (key->crc32) != crc)
+  {
+    GNUNET_break_op (0);
+    return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
 }