Simplify.

This commit is contained in:
joerg 2015-08-28 13:04:48 +00:00
parent f1688a8203
commit b5b69f0009
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: regress_buffer.c,v 1.4 2015/01/29 07:26:02 spz Exp $ */
/* $NetBSD: regress_buffer.c,v 1.5 2015/08/28 13:04:48 joerg Exp $ */
/*
* Copyright (c) 2003-2007 Niels Provos <provos@citi.umich.edu>
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@ -33,7 +33,7 @@
#include "event2/event-config.h"
#include <sys/cdefs.h>
__RCSID("$NetBSD: regress_buffer.c,v 1.4 2015/01/29 07:26:02 spz Exp $");
__RCSID("$NetBSD: regress_buffer.c,v 1.5 2015/08/28 13:04:48 joerg Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@ -199,7 +199,7 @@ test_evbuffer(void *ptr)
tt_assert(evbuffer_get_length(evb_two) == 0);
tt_assert(evbuffer_get_length(evb) == 7);
tt_assert(!memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) != 0);
tt_assert(memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) == 0);
memset(buffer, 0, sizeof(buffer));
evbuffer_add(evb, buffer, sizeof(buffer));

View File

@ -3805,7 +3805,7 @@ static void try_connection(void *eloop_ctx, void *timeout_ctx)
if (ctrl_ifname == NULL)
ctrl_ifname = wpa_cli_get_default_ifname();
if (!wpa_cli_open_connection(ctrl_ifname, 1) == 0) {
if (wpa_cli_open_connection(ctrl_ifname, 1) != 0) {
if (!warning_displayed) {
printf("Could not connect to wpa_supplicant: "
"%s - re-trying\n",