unsigned char*key_buf;
key_len = element_length_in_bytes (k) < 33 ? 3 : element_length_in_bytes (k);
- key_buf = (unsigned char*) malloc (key_len);
+ key_buf = (unsigned char *) malloc (key_len);
element_to_bytes (key_buf, k);
GNUNET_memcpy (key->aes_key, key_buf, GNUNET_CRYPTO_AES_KEY_LENGTH);
*result = GNUNET_malloc (12 + cph_buf_len + aes_buf_len);
ptr = *result;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*len = htonl (file_len);
ptr += 4;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*len = htonl (aes_buf_len);
ptr += 4;
GNUNET_memcpy (ptr, aes_buf, aes_buf_len);
ptr += aes_buf_len;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*len = htonl (cph_buf_len);
ptr += 4;
GNUNET_memcpy (ptr, cph_buf, cph_buf_len);
char *ptr;
uint32_t *len;
- ptr = (char*) data;
- len = (uint32_t*) ptr;
+ ptr = (char *) data;
+ len = (uint32_t *) ptr;
buf_len = ntohl (*len);
ptr += 4;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*aes_buf_len = ntohl (*len);
ptr += 4;
*aes_buf = GNUNET_malloc (*aes_buf_len);
GNUNET_memcpy (*aes_buf, ptr, *aes_buf_len);
ptr += *aes_buf_len;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*cph_buf_len = ntohl (*len);
ptr += 4;
*cph_buf = GNUNET_malloc (*cph_buf_len);
int aes_buf_len;
ssize_t result_len;
- if (! (cph = gabe_enc (key->pub, m, (char*) policy)))
+ if (! (cph = gabe_enc (key->pub, m, (char *) policy)))
return GNUNET_SYSERR;
cph_buf_len = gabe_cph_serialize (cph,
&cph_buf);
}
gabe_cph_free (cph);
GNUNET_free (cph);
- plt_len = aes_128_cbc_decrypt (aes_buf, aes_buf_size, m, (char**) result);
+ plt_len = aes_128_cbc_decrypt (aes_buf, aes_buf_size, m, (char **) result);
GNUNET_free (cph_buf);
GNUNET_free (aes_buf);
element_clear (m);
size = GNUNET_ABE_cpabe_encrypt (TESTSTRING, strlen (TESTSTRING) + 1,
"testattr", // Policy
msk,
- (void*) &result);
+ (void *) &result);
GNUNET_assert (-1 != size);
attrs = GNUNET_malloc (2 * sizeof(char*));
attrs[0] = "testattr";
size = GNUNET_ABE_cpabe_decrypt (result, size,
key,
- (void*) &res);
+ (void *) &res);
if (strlen (TESTSTRING) + 1 != size)
{
printf ("abeciphertest failed: decryptBlock returned %d\n", size);
options,
&run,
NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
options,
&run,
NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
options,
&run,
NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
options,
&run,
NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
// GstPipeline *pipeline;
- gst = (GNUNET_gstData*) malloc (sizeof(struct GNUNET_gstData));
+ gst = (GNUNET_gstData *) malloc (sizeof(struct GNUNET_gstData));
// gst->audio_message.header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO);
dh->rh (dh->rh_cls,
rh,
payload_length,
- (const char*) &req[1]);
+ (const char *) &req[1]);
}
gettext_noop
("Monitor DNS queries."), options,
&run, NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
("Change DNS replies to point elsewhere."),
options,
&run, NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
sizeof(struct GNUNET_HashCode));
/* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash,
so we put the IP address in there (and hope for few collisions) */
- off = (char*) hash;
+ off = (char *) hash;
switch (ri->remote_address.af)
{
case AF_INET:
static const char *sbin_iptables;
-#if !defined(_LINUX_IN6_H) && defined(__linux__)
+#if ! defined(_LINUX_IN6_H) && defined(__linux__)
/**
* This is in linux/include/net/ipv6.h, but not always exported.
*/
strcpy (dev, ifr.ifr_name);
return fd;
}
+
+
#else /* BSD et al, including DARWIN */
#ifdef SIOCIFCREATE
static int
-init_tun(char *dev)
+init_tun (char *dev)
{
int fd;
int s;
struct ifreq ifr;
- fd = open(dev, O_RDWR);
- if(fd == -1)
+ fd = open (dev, O_RDWR);
+ if (fd == -1)
{
- s = socket(AF_INET, SOCK_DGRAM, 0);
+ s = socket (AF_INET, SOCK_DGRAM, 0);
if (s < 0)
return -1;
- memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, dev + 5, sizeof(ifr.ifr_name) - 1);
- if (!ioctl(s, SIOCIFCREATE, &ifr))
- fd = open(dev, O_RDWR);
- close(s);
+ memset (&ifr, 0, sizeof(ifr));
+ strncpy (ifr.ifr_name, dev + 5, sizeof(ifr.ifr_name) - 1);
+ if (! ioctl (s, SIOCIFCREATE, &ifr))
+ fd = open (dev, O_RDWR);
+ close (s);
}
return fd;
}
+
+
#else
-#define init_tun(dev) open(dev, O_RDWR)
+#define init_tun(dev) open (dev, O_RDWR)
#endif
#endif /* !IFF_TUN (BSD) */
"run a testbed to measure file-sharing performance"),
options, &run,
NULL)) ? ret : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
(void) cls;
if (GNUNET_SYSERR ==
GNUNET_GNSRECORD_records_deserialize (mlen,
- (const char*) &lookup_msg[1],
+ (const char *) &lookup_msg[1],
rd_count,
rd))
{
GNUNET_assert (GNUNET_OK ==
GNUNET_GNSRECORD_records_deserialize (mlen,
(const
- char*) &lookup_msg[1],
+ char *) &lookup_msg[1],
rd_count,
rd));
proc (proc_cls,
/* for a another query, ignore */
return;
}
- request->packet = GNUNET_DNSPARSER_parse ((char*) dns,
+ request->packet = GNUNET_DNSPARSER_parse ((char *) dns,
r);
GNUNET_DNSSTUB_resolve_cancel (request->dns_lookup);
send_response (request);
_ ("GNUnet DNS-to-GNS proxy (a DNS server)"),
options,
&run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
&run,
NULL))
ret = 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
"This program will import some GNS authorities into your GNS namestore."),
options,
&run, NULL);
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return GNUNET_OK == r ? ret : 1;
}
+ alen + sizeof(uint16_t))
return; /* need more data */
dom_name = (const char *) &dom_len[1];
- port = (const uint16_t*) &dom_name[*dom_len];
+ port = (const uint16_t *) &dom_name[*dom_len];
s5r->domain = GNUNET_strndup (dom_name,
*dom_len);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
GNUNET_GNSRECORD_records_serialize (rd_count,
rd,
len,
- (char*) &rmsg[1]));
+ (char *) &rmsg[1]));
GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (gc->client),
env);
GNUNET_CONTAINER_DLL_remove (gc->clh_head,
default:
answer_records[i - skip_answers].data.raw.data_len = rd[i].data_size;
- answer_records[i - skip_answers].data.raw.data = (char*) rd[i].data;
+ answer_records[i - skip_answers].data.raw.data = (char *) rd[i].data;
break;
}
GNUNET_break (0 == (rd[i - skip_answers].flags
additional_records[i - skip_additional].data.raw.data_len =
rd[i].data_size;
additional_records[i - skip_additional].data.raw.data =
- (char*) rd[i].data;
+ (char *) rd[i].data;
break;
}
GNUNET_break (0 == (rd[i - skip_additional].flags
goto finish;
}
/* Alias names */
- *((char**) buffer) = NULL;
- result->h_aliases = (char**) buffer;
+ *((char **) buffer) = NULL;
+ result->h_aliases = (char **) buffer;
idx = sizeof(char*);
/* Official name */
/* Address array address_length is always a multiple of 32bits */
for (i = 0; i < u.count; i++)
- ((char**) (buffer + idx))[i] = buffer + astart + address_length * i;
- ((char**) (buffer + idx))[i] = NULL;
- result->h_addr_list = (char**) (buffer + idx);
+ ((char **) (buffer + idx))[i] = buffer + astart + address_length * i;
+ ((char **) (buffer + idx))[i] = NULL;
+ result->h_addr_list = (char **) (buffer + idx);
status = NSS_STATUS_SUCCESS;
_ ("GNUnet hostlist server and client"),
options,
&run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
sprintf (__gauger_s, "%Lf", (long double) (value)); \
__gauger_v[0] = "gauger"; \
__gauger_v[1] = "-n"; \
- __gauger_v[2] = (char*) (counter); \
+ __gauger_v[2] = (char *) (counter); \
__gauger_v[3] = "-d"; \
__gauger_v[4] = __gauger_s; \
__gauger_v[5] = "-u"; \
- __gauger_v[6] = (char*) (unit); \
+ __gauger_v[6] = (char *) (unit); \
__gauger_v[7] = "-c"; \
- __gauger_v[8] = (char*) (category); \
- __gauger_v[9] = (char*) NULL; \
+ __gauger_v[8] = (char *) (category); \
+ __gauger_v[9] = (char *) NULL; \
execvp ("gauger", __gauger_v); \
_exit (1); \
}else{ \
sprintf (__gauger_s, "%Lf", (long double) (value)); \
__gauger_v[0] = "gauger"; \
__gauger_v[1] = "-n"; \
- __gauger_v[2] = (char*) (counter); \
+ __gauger_v[2] = (char *) (counter); \
__gauger_v[3] = "-d"; \
__gauger_v[4] = __gauger_s; \
__gauger_v[5] = "-u"; \
- __gauger_v[6] = (char*) (unit); \
+ __gauger_v[6] = (char *) (unit); \
__gauger_v[7] = "-i"; \
__gauger_v[8] = id; \
__gauger_v[9] = "-c"; \
*/
#define GNUNET_BIO_read_int32(h, i) GNUNET_BIO_read_int32__ (h, __FILE__, \
__LINE__, \
- (int32_t*) i)
+ (int32_t *) i)
/**
*/
#define GNUNET_BIO_read_int64(h, i) GNUNET_BIO_read_int64__ (h, __FILE__, \
__LINE__, \
- (int64_t*) i)
+ (int64_t *) i)
/**
*/
#define GNUNET_is_zero(a) \
({ \
- static const typeof (*a) _z; \
+ static const typeof (*a)_z; \
memcmp ((a), &_z, sizeof(_z)); \
})
*/
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx) \
({ \
- void (*_cb)(void *cls, const str *msg) = &handle_ ## name; \
+ void (*_cb)(void *cls, const str * msg) = &handle_ ## name; \
((struct GNUNET_MQ_MessageHandler){ NULL, \
(GNUNET_MQ_MessageCallback) _cb, \
(ctx), \
*/
#define GNUNET_MQ_hd_var_size(name, code, str, ctx) \
__extension__ ({ \
- int (*_mv)(void *cls, const str *msg) = &check_ ## name; \
- void (*_cb)(void *cls, const str *msg) = &handle_ ## name; \
+ int (*_mv)(void *cls, const str * msg) = &check_ ## name; \
+ void (*_cb)(void *cls, const str * msg) = &handle_ ## name; \
((struct GNUNET_MQ_MessageHandler){ (GNUNET_MQ_MessageValidationCallback) \
_mv, \
(GNUNET_MQ_MessageCallback) _cb, \
#if defined(__sparc__)
-#define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \
- sizeof((val))); \
+#define MAKE_UNALIGNED(val) ({ __typeof__((val))__tmp; memmove (&__tmp, &(val), \
+ sizeof((val))); \
__tmp; })
#else
#define MAKE_UNALIGNED(val) val
}
if (GNUNET_OK != GNUNET_GNSRECORD_string_to_value (rd->record_type,
value,
- (void**) &rd->data,
+ (void **) &rd->data,
&rd->data_size))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Value invalid for record type\n");
GNUNET_free (data);
return GNUNET_SYSERR;
}
- *(void**) spec->ptr = data;
+ *(void **) spec->ptr = data;
*spec->size_ptr = size;
return GNUNET_OK;
}
if (0 != *spec->size_ptr)
{
GNUNET_free (*(void **) spec->ptr);
- *(void**) spec->ptr = NULL;
+ *(void **) spec->ptr = NULL;
*spec->size_ptr = 0;
}
}
&entry->query));
GNUNET_STRINGS_base64_decode (block,
strlen (block),
- (void**) &block_buffer);
+ (void **) &block_buffer);
entry->block = (struct GNUNET_GNSRECORD_Block *) block_buffer;
if (GNUNET_OK !=
GNUNET_CONTAINER_multihashmap_put (plugin->hm,
+ sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey)
+ sizeof(struct GNUNET_CRYPTO_EcdsaSignature);
- GNUNET_STRINGS_base64_encode ((char*) entry->block,
+ GNUNET_STRINGS_base64_encode ((char *) entry->block,
block_size,
&block_b64);
GNUNET_CRYPTO_hash_to_enc (&entry->query,
&query);
GNUNET_asprintf (&line,
"%s,%s\n",
- (char*) &query,
+ (char *) &query,
block_b64);
GNUNET_free (block_b64);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Loading `%s' namecache plugin\n"),
plugin_name);
GNUNET_asprintf (&libname, "libgnunet_plugin_namecache_%s", plugin_name);
- if (NULL == (ret = GNUNET_PLUGIN_load (libname, (void*) cfg)))
+ if (NULL == (ret = GNUNET_PLUGIN_load (libname, (void *) cfg)))
{
fprintf (stderr, "Failed to load plugin `%s'!\n", plugin_name);
GNUNET_free (libname);
"GNU Name System First Come First Serve name registration service"),
options,
&run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
GNUNET_CRYPTO_ecdsa_key_clear (&fcfs_zone_pkey);
return ret;
}
GNUNET_STRINGS_base64_decode (zone_private_key,
strlen (zone_private_key),
- (void**) &private_key);
+ (void **) &private_key);
entry->private_key = *private_key;
GNUNET_free (private_key);
}
entry->record_data[i].flags = rd[i].flags;
entry->record_data[i].data_size = rd[i].data_size;
entry->record_data[i].data = GNUNET_malloc (rd[i].data_size);
- GNUNET_memcpy ((char*) entry->record_data[i].data,
+ GNUNET_memcpy ((char *) entry->record_data[i].data,
rd[i].data,
rd[i].data_size);
}
if (NULL != handle->emsg)
GNUNET_free (handle->emsg);
if (NULL != handle->address)
- GNUNET_free ((char*) handle->address);
+ GNUNET_free ((char *) handle->address);
if (NULL != handle->expiration_str)
GNUNET_free (handle->expiration_str);
if (NULL != handle->pubkey)
o = NULL;
s = GNUNET_STRINGS_base64_decode (peer,
strlen (peer),
- (void**) &o);
+ (void **) &o);
if (sizeof(struct GNUNET_PeerIdentity) == s)
GNUNET_memcpy (&entry->peer,
o,
}
entry->value_size = GNUNET_STRINGS_base64_decode (value,
strlen (value),
- (void**) &entry->value);
+ (void **) &entry->value);
if (GNUNET_SYSERR ==
GNUNET_STRINGS_fancy_time_to_absolute (expiry,
&entry->expiry))
entry->value_size,
&val);
expiry = GNUNET_STRINGS_absolute_time_to_string (entry->expiry);
- GNUNET_STRINGS_base64_encode ((char*) &entry->peer,
+ GNUNET_STRINGS_base64_encode ((char *) &entry->peer,
sizeof(struct GNUNET_PeerIdentity),
&peer);
GNUNET_asprintf (&line,
"libgnunet_plugin_peerstore_%s",
plugin_name);
if (NULL == (ret = GNUNET_PLUGIN_load (libname,
- (void*) cfg)))
+ (void *) cfg)))
{
fprintf (stderr,
"Failed to load plugin `%s'!\n",
identity,
"key",
&test_record,
- (void*) identity));
+ (void *) identity));
}
GNUNET_NO);
GNUNET_DNS_request_answer (rc->rh,
mlen + sizeof(struct GNUNET_TUN_DnsHeader),
- (const void*) &msg->dns);
+ (const void *) &msg->dns);
GNUNET_CONTAINER_DLL_remove (exit->receive_queue_head,
exit->receive_queue_tail,
rc);
NULL))
? 0
: 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
GNUNET_assert (GNUNET_OK ==
GNUNET_GNSRECORD_string_to_value (GNUNET_GNSRECORD_TYPE_VPN,
rd_string,
- (void**) &rd.data,
+ (void **) &rd.data,
&rd.data_size));
rd.record_type = GNUNET_GNSRECORD_TYPE_VPN;
1, &rd,
&commence_testing,
NULL);
- GNUNET_free ((void**) rd.data);
+ GNUNET_free ((void **) rd.data);
GNUNET_free (rd_string);
}
abort_task =
GNUNET_SCHEDULER_add_delayed (abort_time,
&do_abort,
- (void*) __LINE__);
+ (void *) __LINE__);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"setup_timeout: %s\n",
GNUNET_STRINGS_relative_time_to_string (abort_time, GNUNET_YES));
else
len = strlen (data);
resp = MHD_create_response_from_buffer (len,
- (void*) data,
+ (void *) data,
MHD_RESPMEM_MUST_COPY);
return resp;
}
if (GNUNET_NO == GNUNET_REST_namespace_match (url, handlers[i].namespace))
continue;
// Match
- handlers[i].proc (conn, (const char*) url, cls);
+ handlers[i].proc (conn, (const char *) url, cls);
GNUNET_free (url);
return GNUNET_YES;
}
for (i = 0; i < ks->threshold; i++)
{
v = ks->presecret_polynomial[i] = gcry_mpi_new (
- GNUNET_SECRETSHARING_ELGAMAL_BITS);
+ GNUNET_SECRETSHARING_ELGAMAL_BITS);
GNUNET_assert (NULL != v);
// Randomize v such that 0 < v < elgamal_q.
// The '- 1' is necessary as bitlength(q) = bitlength(p) - 1.
GNUNET_assert (GNUNET_SYSERR !=
GNUNET_CONTAINER_bloomfilter_get_raw_data (
op->state->local_bf,
- (char*) &msg[1],
+ (char *) &msg[1],
bf_size));
msg->sender_element_count = htonl (op->state->my_element_count);
msg->bloomfilter_total_length = htonl (bf_size);
GNUNET_CONTAINER_multihashmap_size (op->state->my_elements));
op->state->full_result_iter
= GNUNET_CONTAINER_multihashmap_iterator_create (
- op->state->my_elements);
+ op->state->my_elements);
send_remaining_elements (op);
return;
}
}
/* single part, done here immediately */
op->state->remote_bf
- = GNUNET_CONTAINER_bloomfilter_init ((const char*) &msg[1],
+ = GNUNET_CONTAINER_bloomfilter_init ((const char *) &msg[1],
bf_size,
bf_bits_per_element);
op->state->salt = ntohl (msg->sender_mutator);
}
}
GNUNET_memcpy (&op->state->bf_data[op->state->bf_data_offset],
- (const char*) &msg[1],
+ (const char *) &msg[1],
chunk_size);
op->state->bf_data_offset += chunk_size;
if (op->state->bf_data_offset == bf_size)
v = key.key_val;
/* count trailing '1'-bits of v */
- for (i = 0; v & 1; v >>= 1, i++)
+ for (i = 0; v &1; v >>= 1, i++)
/* empty */;
ibf_insert (se->strata[i], key);
}
v = key.key_val;
/* count trailing '1'-bits of v */
- for (i = 0; v & 1; v >>= 1, i++)
+ for (i = 0; v &1; v >>= 1, i++)
/* empty */;
ibf_remove (se->strata[i], key);
}
_ (
"Daemon to log latency values of connections to neighbours"),
options, &run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
_ (
"Daemon to restrict incoming transport layer connections during testbed deployments"),
options, &run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
(
"Daemon to restrict underlay network in testbed deployments"),
options, &run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
static int
compare_mem_table_structs (const void *a, const void *b)
{
- return strcmp (((const mem_table_struct*) a)->name, ((const
- mem_table_struct*) b)->
+ return strcmp (((const mem_table_struct *) a)->name, ((const
+ mem_table_struct *) b)
+ ->
name);
}
{
for (it = response_list; it; it = it->next)
{
- sdp_record_t *record = (sdp_record_t*) it->data;
+ sdp_record_t *record = (sdp_record_t *) it->data;
sdp_list_t *proto_list = 0;
if (sdp_get_access_protos (record, &proto_list) == 0)
{
* check for insanity where the present bitmaps
* keep claiming to extend up to or even beyond the
* stated radiotap header length
- */if (iterator->arg - ((uint8_t*) iterator->rtheader) >
+ */if (iterator->arg - ((uint8_t *) iterator->rtheader) >
iterator->max_length)
return -1;
}
case IEEE80211_RADIOTAP_DBM_ANTSIGNAL:
if (! got_signal)
{
- ri->ri_power = *((int8_t*) iterator.this_arg);
+ ri->ri_power = *((int8_t *) iterator.this_arg);
got_signal = 1;
}
break;
case IEEE80211_RADIOTAP_DB_ANTSIGNAL:
if (! got_signal)
{
- ri->ri_power = *((int8_t*) iterator.this_arg);
+ ri->ri_power = *((int8_t *) iterator.this_arg);
got_signal = 1;
}
break;
case IEEE80211_RADIOTAP_DBM_ANTNOISE:
if (! got_noise)
{
- ri->ri_noise = *((int8_t*) iterator.this_arg);
+ ri->ri_noise = *((int8_t *) iterator.this_arg);
got_noise = 1;
}
break;
case IEEE80211_RADIOTAP_DB_ANTNOISE:
if (! got_noise)
{
- ri->ri_noise = *((int8_t*) iterator.this_arg);
+ ri->ri_noise = *((int8_t *) iterator.this_arg);
got_noise = 1;
}
break;
mas.session = NULL;
(void) GNUNET_SERVER_mst_receive (plugin->helper_payload_tokenizer,
&mas,
- (const char*) &rxinfo[1],
+ (const char *) &rxinfo[1],
msize - sizeof(struct
GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage),
GNUNET_YES, GNUNET_NO);
unsigned char*key_buf;
key_len = element_length_in_bytes (k) < 33 ? 3 : element_length_in_bytes (k);
- key_buf = (unsigned char*) malloc (key_len);
+ key_buf = (unsigned char *) malloc (key_len);
element_to_bytes (key_buf, k);
GNUNET_memcpy (key->aes_key,
*result = GNUNET_malloc (12 + cph_buf_len + aes_buf_len);
ptr = *result;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*len = htonl (file_len);
ptr += 4;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*len = htonl (aes_buf_len);
ptr += 4;
GNUNET_memcpy (ptr, aes_buf, aes_buf_len);
ptr += aes_buf_len;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*len = htonl (cph_buf_len);
ptr += 4;
GNUNET_memcpy (ptr, cph_buf, cph_buf_len);
char *ptr;
uint32_t *len;
- ptr = (char*) data;
- len = (uint32_t*) ptr;
+ ptr = (char *) data;
+ len = (uint32_t *) ptr;
buf_len = ntohl (*len);
ptr += 4;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*aes_buf_len = ntohl (*len);
ptr += 4;
*aes_buf = GNUNET_malloc (*aes_buf_len);
GNUNET_memcpy (*aes_buf, ptr, *aes_buf_len);
ptr += *aes_buf_len;
- len = (uint32_t*) ptr;
+ len = (uint32_t *) ptr;
*cph_buf_len = ntohl (*len);
ptr += 4;
*cph_buf = GNUNET_malloc (*cph_buf_len);
int aes_buf_len;
ssize_t result_len;
- if (! (cph = gabe_enc (key->pub, m, (char*) policy)))
+ if (! (cph = gabe_enc (key->pub, m, (char *) policy)))
return GNUNET_SYSERR;
cph_buf_len = gabe_cph_serialize (cph,
&cph_buf);
}
gabe_cph_free (cph);
GNUNET_free (cph);
- plt_len = aes_128_cbc_decrypt (aes_buf, aes_buf_size, m, (char**) result);
+ plt_len = aes_128_cbc_decrypt (aes_buf, aes_buf_size, m, (char **) result);
GNUNET_free (cph_buf);
GNUNET_free (aes_buf);
element_clear (m);
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_put (edc->map,
&key,
- (void*) (long) i + max,
+ (void *) (long) i + max,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
/* negative values */
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_put (edc->map,
&key,
- (void*) (long) max - i,
+ (void *) (long) max - i,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
gcry_mpi_release (fact);
GNUNET_STRINGS_utf8_toupper (enc, up_ptr);
return GNUNET_STRINGS_string_to_data (upper_enc, enclen,
- (unsigned char*) result,
+ (unsigned char *) result,
sizeof(struct GNUNET_HashCode));
}
const void *plaintext, size_t plaintext_len,
struct GNUNET_HashCode *hmac)
{
- GNUNET_CRYPTO_hmac_raw ((void*) key->key, sizeof(key->key),
+ GNUNET_CRYPTO_hmac_raw ((void *) key->key, sizeof(key->key),
plaintext, plaintext_len,
hmac);
}
GNUNET_PROGRAM_run (argc, argv, "gnunet-resolver [hostname]",
gettext_noop ("Use build-in GNUnet stub resolver"),
options, &run, NULL)) ? 0 : 1;
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void *) argv);
return ret;
}
*/
#define LOG_MAX_LINE_LENGTH (17)
-#define LOG_BUFFER_SIZE LOG_MAX_NUM_LINES *LOG_MAX_LINE_LENGTH
+#define LOG_BUFFER_SIZE LOG_MAX_NUM_LINES * LOG_MAX_LINE_LENGTH
static char buf[LOG_BUFFER_SIZE];
read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
stdout_read_handle,
&read_call,
- (void*) stdout_read_handle);
+ (void *) stdout_read_handle);
return;
}
read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
stdout_read_handle,
&read_call,
- (void*) stdout_read_handle);
+ (void *) stdout_read_handle);
}
"-o", "BatchMode yes",
"-o", "UserKnownHostsFile /tmp/gnunet_test_socks_ssh_garbage",
"-o", "StrictHostKeyChecking no",
- "127.0.0.1", "-N", (char*) NULL);
+ "127.0.0.1", "-N", (char *) NULL);
perror (
"execlp (\"ssh\",\"ssh\",...,\"-D\",\"1081\",\"127.0.0.1\",\"-N\") ");
printf (""