From a24dcffe20a3f0059fb58619b57b488d2bfae5ad Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 5 Jul 2000 06:05:15 +0000 Subject: [PATCH] Global cosmetic change. --- lib/silccore/id.c | 7 +++++-- lib/silccore/idcache.c | 11 +++++------ lib/silccore/silcbuffer.c | 13 ++++++------- lib/silccore/silcbuffmt.c | 7 +++++-- lib/silccore/silcbufutil.c | 7 +++++-- lib/silccore/silcchannel.c | 19 +++++-------------- lib/silccore/silccommand.c | 11 +++++------ lib/silccore/silcconfig.c | 7 +++++-- lib/silccore/silclog.c | 5 ++++- lib/silccore/silcnet.c | 5 ++++- lib/silccore/silcpacket.c | 7 +++++-- lib/silccore/silcprotocol.c | 12 +++++------- lib/silccore/silcschedule.c | 7 +++++-- lib/silccore/silcsockconn.c | 14 ++++++-------- lib/silccore/silctask.c | 17 +++++------------ lib/silccrypt/silccipher.c | 22 +++++----------------- lib/silccrypt/silchash.c | 20 +++++--------------- lib/silccrypt/silchmac.c | 12 +++++------- lib/silccrypt/silcrng.c | 17 +++++++---------- lib/silcmath/silcprimegen.c | 9 ++++++--- lib/silcske/groups.c | 7 +++++-- lib/silcske/payload.c | 19 +++++-------------- lib/silcske/silcske.c | 11 +++++------ 23 files changed, 118 insertions(+), 148 deletions(-) diff --git a/lib/silccore/id.c b/lib/silccore/id.c index d7aaf3af..ccfa04ca 100644 --- a/lib/silccore/id.c +++ b/lib/silccore/id.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/idcache.c b/lib/silccore/idcache.c index a16bdc10..0d3f4e9b 100644 --- a/lib/silccore/idcache.c +++ b/lib/silccore/idcache.c @@ -21,8 +21,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -114,8 +117,6 @@ int silc_idcache_add(SilcIDCache **cache, unsigned int cache_count, if (c == NULL) { c = silc_calloc(5, sizeof(*c)); - if (!c) - return 0; cache_count = 5; } @@ -136,8 +137,6 @@ int silc_idcache_add(SilcIDCache **cache, unsigned int cache_count, if (i == cache_count) { c = silc_realloc(c, sizeof(*c) * (cache_count + 5)); - if (!c) - return cache_count; for (i = cache_count; i < cache_count + 5; i++) { c[i].data = NULL; c[i].id = NULL; diff --git a/lib/silccore/silcbuffer.c b/lib/silccore/silcbuffer.c index 662cf31e..fc2b6b40 100644 --- a/lib/silccore/silcbuffer.c +++ b/lib/silccore/silcbuffer.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -88,13 +91,9 @@ SilcBuffer silc_buffer_alloc(unsigned int len) /* Allocate new SilcBuffer */ sb = silc_calloc(1, sizeof(*sb)); - if (!sb) - return NULL; /* Allocate the actual data area */ - data = silc_malloc(len); - if (!data) - return NULL; + data = silc_calloc(len, sizeof(*data)); memset(data, 0, len); /* Set pointers to the new buffer */ diff --git a/lib/silccore/silcbuffmt.c b/lib/silccore/silcbuffmt.c index 5d56f180..95fe7288 100644 --- a/lib/silccore/silcbuffmt.c +++ b/lib/silccore/silcbuffmt.c @@ -24,8 +24,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silcbufutil.c b/lib/silccore/silcbufutil.c index f89389d1..53a676f8 100644 --- a/lib/silccore/silcbufutil.c +++ b/lib/silccore/silcbufutil.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silcchannel.c b/lib/silccore/silcchannel.c index 6355f710..4cfe3002 100644 --- a/lib/silccore/silcchannel.c +++ b/lib/silccore/silcchannel.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -60,10 +63,6 @@ SilcChannelPayload silc_channel_parse_payload(SilcBuffer buffer) SILC_LOG_DEBUG(("Parsing channel payload")); new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new channel payload")); - return NULL; - } /* Parse the Channel Payload. Ignore padding and IV, we don't need them. */ @@ -119,8 +118,6 @@ SilcBuffer silc_channel_encode_payload(unsigned short nick_len, /* Allocate channel payload buffer */ len += pad_len; buffer = silc_buffer_alloc(len + iv_len); - if (!buffer) - return NULL; /* Generate padding */ for (i = 0; i < pad_len; i++) @@ -198,10 +195,6 @@ SilcChannelKeyPayload silc_channel_key_parse_payload(SilcBuffer buffer) SILC_LOG_DEBUG(("Parsing channel key payload")); new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new channel key payload")); - return NULL; - } /* Parse the Channel Key Payload */ silc_buffer_unformat(buffer, @@ -252,8 +245,6 @@ SilcBuffer silc_channel_key_encode_payload(unsigned short id_len, 2 + cipher */ len = 2 + id_len + 2 + key_len + 2 + cipher_len; buffer = silc_buffer_alloc(len); - if (!buffer) - return NULL; silc_buffer_pull_tail(buffer, SILC_BUFFER_END(buffer)); diff --git a/lib/silccore/silccommand.c b/lib/silccore/silccommand.c index 881477d1..9564d4e0 100644 --- a/lib/silccore/silccommand.c +++ b/lib/silccore/silccommand.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -58,10 +61,6 @@ SilcCommandPayload silc_command_parse_payload(SilcBuffer buffer) SILC_LOG_DEBUG(("Parsing command payload")); new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new command payload")); - return NULL; - } /* Parse the Command Payload */ silc_buffer_unformat(buffer, diff --git a/lib/silccore/silcconfig.c b/lib/silccore/silcconfig.c index bb324223..59fefec7 100644 --- a/lib/silccore/silcconfig.c +++ b/lib/silccore/silcconfig.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silclog.c b/lib/silccore/silclog.c index cc74119d..aecd6bf5 100644 --- a/lib/silccore/silclog.c +++ b/lib/silccore/silclog.c @@ -20,11 +20,14 @@ /* * $Id$ * $Log$ + * Revision 1.3 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * * Revision 1.2 2000/07/03 05:53:58 priikone * Fixed file purging bug. The purging should work now ok. * * Revision 1.1.1.1 2000/06/27 11:36:55 priikone - * Importet from internal CVS/Added Log headers. + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silcnet.c b/lib/silccore/silcnet.c index 3104b67c..989020f7 100644 --- a/lib/silccore/silcnet.c +++ b/lib/silccore/silcnet.c @@ -20,11 +20,14 @@ /* * $Id$ * $Log$ + * Revision 1.3 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * * Revision 1.2 2000/06/30 10:49:48 priikone * Added SOCKS4 and SOCKS5 support for SILC client. * * Revision 1.1.1.1 2000/06/27 11:36:55 priikone - * Importet from internal CVS/Added Log headers. + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silcpacket.c b/lib/silccore/silcpacket.c index d2364634..f0d92ab5 100644 --- a/lib/silccore/silcpacket.c +++ b/lib/silccore/silcpacket.c @@ -23,8 +23,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silcprotocol.c b/lib/silccore/silcprotocol.c index 56a08912..cda59efc 100644 --- a/lib/silccore/silcprotocol.c +++ b/lib/silccore/silcprotocol.c @@ -23,8 +23,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -54,11 +57,6 @@ void silc_protocol_alloc(SilcProtocolType type, SilcProtocol *new_protocol, } *new_protocol = silc_calloc(1, sizeof(**new_protocol)); - if (*new_protocol == NULL) { - SILC_LOG_ERROR(("Cannot allocate new protocol object")); - return; - } - (*new_protocol)->protocol = (SilcProtocolObject *)&silc_protocol_list[i]; (*new_protocol)->state = SILC_PROTOCOL_STATE_UNKNOWN; (*new_protocol)->context = context; diff --git a/lib/silccore/silcschedule.c b/lib/silccore/silcschedule.c index 5ae44e61..78090738 100644 --- a/lib/silccore/silcschedule.c +++ b/lib/silccore/silcschedule.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silccore/silcsockconn.c b/lib/silccore/silcsockconn.c index f6de8aa9..79ea3f84 100644 --- a/lib/silccore/silcsockconn.c +++ b/lib/silccore/silcsockconn.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -36,14 +39,9 @@ void silc_socket_alloc(int sock, SilcSocketType type, void *user_data, { SILC_LOG_DEBUG(("Allocating new socket connection object")); - *new_socket = silc_calloc(1, sizeof(**new_socket)); - if (*new_socket == NULL) { - SILC_LOG_ERROR(("Could not allocate new socket connection object")); - return; - } - /* Set the pointers. Incoming and outgoing data buffers are allocated by the server when they are first used. */ + *new_socket = silc_calloc(1, sizeof(**new_socket)); (*new_socket)->sock = sock; (*new_socket)->type = type; (*new_socket)->user_data = user_data; diff --git a/lib/silccore/silctask.c b/lib/silccore/silctask.c index 33a05514..cc177dc1 100644 --- a/lib/silccore/silctask.c +++ b/lib/silccore/silctask.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:35 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -38,11 +41,6 @@ void silc_task_queue_alloc(SilcTaskQueue *new, int valid) SILC_LOG_DEBUG(("Allocating new task queue")); *new = silc_calloc(1, sizeof(**new)); - if (*new == NULL) { - SILC_LOG_ERROR(("Could not allocate new task queue object: %s", - strerror(errno))); - return; - } /* Set the pointers */ (*new)->valid = valid; @@ -371,11 +369,6 @@ SilcTask silc_task_register(SilcTaskQueue queue, int fd, } new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new task object")); - return NULL; - } - new->fd = fd; new->context = context; new->callback = cb; diff --git a/lib/silccrypt/silccipher.c b/lib/silccrypt/silccipher.c index 72bbc435..6bef0f15 100644 --- a/lib/silccrypt/silccipher.c +++ b/lib/silccrypt/silccipher.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:54 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:08:43 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:54 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -75,18 +78,7 @@ int silc_cipher_register(SilcCipherObject *cipher) SILC_LOG_DEBUG(("Registering new cipher")); new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new cipher list object: %s", - strerror(errno))); - return FALSE; - } - new->cipher = silc_calloc(1, sizeof(*new->cipher)); - if (!new->cipher) { - SILC_LOG_ERROR(("Could not allocate new cipher object: %s", - strerror(errno))); - return FALSE; - } /* Set the pointers */ new->cipher->name = strdup(cipher->name); @@ -180,10 +172,6 @@ int silc_cipher_alloc(const unsigned char *name, SilcCipher *new_cipher) /* Allocate the new object */ *new_cipher = silc_calloc(1, sizeof(**new_cipher)); - if (*new_cipher == NULL) { - SILC_LOG_ERROR(("Could not allocate new cipher object")); - return FALSE; - } if (silc_cipher_list) { diff --git a/lib/silccrypt/silchash.c b/lib/silccrypt/silchash.c index 80680853..547cb60d 100644 --- a/lib/silccrypt/silchash.c +++ b/lib/silccrypt/silchash.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:08:43 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -63,16 +66,7 @@ int silc_hash_register(SilcHashObject *hash) SILC_LOG_DEBUG(("Registering new hash function")); new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new hash list object")); - return FALSE; - } - new->hash = silc_calloc(1, sizeof(*new->hash)); - if (!new->hash) { - SILC_LOG_ERROR(("Could not allocate new hash object")); - return FALSE; - } /* Set the pointers */ new->hash->name = silc_calloc(1, strlen(hash->name)); @@ -163,10 +157,6 @@ int silc_hash_alloc(const unsigned char *name, SilcHash *new_hash) /* Allocate the new object */ *new_hash = silc_calloc(1, sizeof(**new_hash)); - if (*new_hash == NULL) { - SILC_LOG_ERROR(("Could not allocate new hash object")); - return FALSE; - } if (silc_hash_list) { h = silc_hash_list; diff --git a/lib/silccrypt/silchmac.c b/lib/silccrypt/silchmac.c index ddf7453b..8554ddbd 100644 --- a/lib/silccrypt/silchmac.c +++ b/lib/silccrypt/silchmac.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:08:43 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -37,11 +40,6 @@ int silc_hmac_alloc(SilcHash hash, SilcHmac *new_hmac) SILC_LOG_DEBUG(("Allocating new hmac object")); *new_hmac = silc_calloc(1, sizeof(**new_hmac)); - if (*new_hmac == NULL) { - SILC_LOG_ERROR(("Could not allocate new hmac object")); - return 0; - } - (*new_hmac)->hash = hash; (*new_hmac)->set_key = silc_hmac_set_key; (*new_hmac)->make_hmac = silc_hmac_make; diff --git a/lib/silccrypt/silcrng.c b/lib/silccrypt/silcrng.c index d5f25333..9470fb03 100644 --- a/lib/silccrypt/silcrng.c +++ b/lib/silccrypt/silcrng.c @@ -27,8 +27,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:55 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:08:43 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:55 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -112,10 +115,6 @@ SilcRng silc_rng_alloc() SILC_LOG_DEBUG(("Allocating new RNG object")); new = silc_calloc(1, sizeof(*new)); - if (!new) { - SILC_LOG_ERROR(("Could not allocate new RNG object")); - return NULL; - } memset(new->pool, 0, sizeof(new->pool)); memset(new->key, 0, sizeof(new->key)); @@ -151,13 +150,13 @@ void silc_rng_init(SilcRng rng) SILC_LOG_DEBUG(("Initializing RNG object")); /* Initialize the states for the RNG. */ - rng->state = silc_malloc(sizeof(*rng->state)); + rng->state = silc_calloc(1, sizeof(*rng->state)); rng->state->low = 0; rng->state->pos = 8; rng->state->next = NULL; first = rng->state; for (i = SILC_RNG_STATE_NUM - 1; i >= 1; i--) { - next = silc_malloc(sizeof(*rng->state)); + next = silc_calloc(1, sizeof(*rng->state)); next->low = (i * (sizeof(rng->pool) / SILC_RNG_STATE_NUM)); next->pos = @@ -424,8 +423,6 @@ unsigned char *silc_rng_get_rn_string(SilcRng rng, unsigned int len) unsigned char *string; string = silc_calloc((len * 2 + 1), sizeof(unsigned char)); - if (string == NULL) - return NULL; for (i = 0; i < len; i++) sprintf(string + 2 * i, "%02x", silc_rng_get_byte(rng)); diff --git a/lib/silcmath/silcprimegen.c b/lib/silcmath/silcprimegen.c index 14719be2..737a09ad 100644 --- a/lib/silcmath/silcprimegen.c +++ b/lib/silcmath/silcprimegen.c @@ -23,8 +23,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:51 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:06:52 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:51 priikone + * Importet from internal CVS/Added Log headers. * * */ @@ -247,7 +250,7 @@ int silc_math_gen_prime(SilcInt *prime, unsigned int bits, int verbose) /* Init modulo table with the prime candidate and the primes in the primetable. */ - spmods = silc_malloc(sizeof(primetable) * sizeof(unsigned int)); + spmods = silc_calloc(1, sizeof(primetable) * sizeof(unsigned int)); for (i = 0; primetable[i] != 0; i++) { silc_mp_mod_ui(&tmp, prime, primetable[i]); spmods[i] = silc_mp_get_ui(&tmp); diff --git a/lib/silcske/groups.c b/lib/silcske/groups.c index 647064cd..18d70c6c 100644 --- a/lib/silcske/groups.c +++ b/lib/silcske/groups.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:56 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:05:15 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:56 priikone + * Imported from internal CVS/Added Log headers. * * */ diff --git a/lib/silcske/payload.c b/lib/silcske/payload.c index 07cebf57..69089920 100644 --- a/lib/silcske/payload.c +++ b/lib/silcske/payload.c @@ -22,8 +22,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:56 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:05:15 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:56 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -50,10 +53,6 @@ SilcSKEStatus silc_ske_payload_start_encode(SilcSKE ske, /* Allocate channel payload buffer. */ buf = silc_buffer_alloc(payload->len); - if (!buf) { - SILC_LOG_ERROR(("Could not allocate encode buffer")); - return SILC_SKE_STATUS_ERROR; - } silc_buffer_pull_tail(buf, payload->len); @@ -290,10 +289,6 @@ SilcSKEStatus silc_ske_payload_one_encode(SilcSKE ske, /* Allocate channel payload buffer. The length of the buffer is 2 + e. */ buf = silc_buffer_alloc(e_len + 2); - if (!buf) { - SILC_LOG_ERROR(("Could not allocate encode buffer")); - return SILC_SKE_STATUS_ERROR; - } silc_buffer_pull_tail(buf, e_len + 2); @@ -406,10 +401,6 @@ SilcSKEStatus silc_ske_payload_two_encode(SilcSKE ske, is 2 + 2 + public key + 2 + f + 2 + signature. */ len = payload->pk_len + 2 + 2 + f_len + 2 + payload->sign_len + 2; buf = silc_buffer_alloc(len); - if (!buf) { - SILC_LOG_ERROR(("Could not allocate encode buffer")); - return SILC_SKE_STATUS_ERROR; - } silc_buffer_pull_tail(buf, len); diff --git a/lib/silcske/silcske.c b/lib/silcske/silcske.c index db3f24db..e29a186d 100644 --- a/lib/silcske/silcske.c +++ b/lib/silcske/silcske.c @@ -20,8 +20,11 @@ /* * $Id$ * $Log$ - * Revision 1.1 2000/06/27 11:36:56 priikone - * Initial revision + * Revision 1.2 2000/07/05 06:05:15 priikone + * Global cosmetic change. + * + * Revision 1.1.1.1 2000/06/27 11:36:56 priikone + * Imported from internal CVS/Added Log headers. * * */ @@ -39,10 +42,6 @@ SilcSKE silc_ske_alloc() SILC_LOG_DEBUG(("Allocating new Key Exchange object")); ske = silc_calloc(1, sizeof(*ske)); - if (!ske) { - SILC_LOG_ERROR(("Could not allocate new SKE object")); - return NULL; - } return ske; } -- 2.24.0