/*
This file is part of GNUnet.
- (C) 2010, 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2010, 2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
{
return
GNUNET_BANDWIDTH_value_init (GNUNET_MIN
- (ntohl (b1.value__), ntohl (b2.value__)));
+ (ntohl (b1.value__),
+ ntohl (b2.value__)));
+}
+
+
+/**
+ * Compute the MAX of two bandwidth values.
+ *
+ * @param b1 first value
+ * @param b2 second value
+ * @return the min of b1 and b2
+ */
+struct GNUNET_BANDWIDTH_Value32NBO
+GNUNET_BANDWIDTH_value_max (struct GNUNET_BANDWIDTH_Value32NBO b1,
+ struct GNUNET_BANDWIDTH_Value32NBO b2)
+{
+ return
+ GNUNET_BANDWIDTH_value_init (GNUNET_MAX
+ (ntohl (b1.value__),
+ ntohl (b2.value__)));
}