]> the.earth.li Git - onak.git/blobdiff - keyarray.c
Add ability to drop overly large packets
[onak.git] / keyarray.c
index 8bade8ca193913330146c3dbe8d1332652692e9d..f869802b83b80fcf549e8c2d685cee47be6a2acc 100644 (file)
@@ -13,8 +13,7 @@
  * more details.
  *
  * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <stdbool.h>
@@ -71,7 +70,7 @@ bool array_add(struct keyarray *array, struct openpgp_fingerprint *fp)
        int  curpos = 0;
 
        found = false;
-       if (array->keys != NULL && array->count > 0) {
+       if (array->size != 0 && array->count > 0) {
                bottom = -1;
                top = array->count - 1;
                while ((top - bottom) > 1) {