diff --git a/iscsi-scst/usr/isns.c b/iscsi-scst/usr/isns.c index c7d8fcca5..d33688e32 100644 --- a/iscsi-scst/usr/isns.c +++ b/iscsi-scst/usr/isns.c @@ -507,9 +507,9 @@ int isns_target_register(char *name) err = isns_tlv_set(&tlv, max_buf - length, ISNS_ATTR_ISCSI_NAME, strlen(isns_entity_target_name) + 1, isns_entity_target_name); } -if (err < 0) + if (err < 0) goto out; - length += err; + length += err; err = isns_tlv_set(&tlv, max_buf - length, ISNS_ATTR_ENTITY_IDENTIFIER, strlen(eid) + 1, eid); @@ -1010,7 +1010,7 @@ static int send_scn_rsp(char *name, uint16_t transaction) *((uint32_t *)hdr->pdu) = 0; max_buf = sizeof(buf) - offsetof(struct isns_hdr, pdu); tlv = (struct isns_tlv *)((char *)hdr->pdu + 4); - length +=4; + length += 4; err = isns_tlv_set(&tlv, max_buf - length, ISNS_ATTR_ISCSI_NAME, strlen(name) + 1, name); diff --git a/iscsi-scst/usr/md5.c b/iscsi-scst/usr/md5.c index 746eef545..fcd7cdf2d 100644 --- a/iscsi-scst/usr/md5.c +++ b/iscsi-scst/usr/md5.c @@ -1,4 +1,4 @@ -/* +/* * MD5 Message Digest Algorithm (RFC1321). * * Derived from cryptoapi implementation, originally based on the @@ -6,10 +6,10 @@ * * Copyright (c) Cryptoapi developers. * Copyright (c) 2002 James Morris - * + * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) + * Software Foundation; either version 2 of the License, or (at your option) * any later version. * */ diff --git a/iscsi-scst/usr/misc.h b/iscsi-scst/usr/misc.h index ef5dbd4bd..eb388e1ad 100644 --- a/iscsi-scst/usr/misc.h +++ b/iscsi-scst/usr/misc.h @@ -25,7 +25,7 @@ struct __qelem { #undef offsetof #ifdef __compiler_offsetof -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) +#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) #else #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) #endif @@ -45,19 +45,19 @@ static inline int list_empty(const struct __qelem *head) static inline int list_length_is_one(const struct __qelem *head) { - return (!list_empty(head) && head->q_forw == head->q_back); + return (!list_empty(head) && head->q_forw == head->q_back); } #define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) #define list_entry(ptr, type, member) \ container_of(ptr, type, member) #define list_for_each_entry(pos, head, member) \ for (pos = list_entry((head)->q_forw, typeof(*pos), member); \ - &pos->member != (head); \ + &pos->member != (head); \ pos = list_entry(pos->member.q_forw, typeof(*pos), member)) #define list_for_each_entry_safe(pos, n, head, member) \ @@ -73,7 +73,7 @@ static inline int list_length_is_one(const struct __qelem *head) INIT_LIST_HEAD(elem); \ } while (0) -#define list_add(new, head) insque (new, head) +#define list_add(new, head) insque(new, head) #define list_add_tail(new, head) insque(new, (head)->q_back) @@ -94,12 +94,12 @@ static inline int list_length_is_one(const struct __qelem *head) #define min_t(type, x, y) ({ \ type __min1 = (x); \ type __min2 = (y); \ - __min1 < __min2 ? __min1: __min2; }) + __min1 < __min2 ? __min1 : __min2; }) #define max_t(type, x, y) ({ \ type __max1 = (x); \ type __max2 = (y); \ - __max1 > __max2 ? __max1: __max2; }) + __max1 > __max2 ? __max1 : __max2; }) #ifndef IPV6_V6ONLY #define IPV6_V6ONLY 26 diff --git a/iscsi-scst/usr/param.c b/iscsi-scst/usr/param.c index afdc83628..e289aa9fa 100644 --- a/iscsi-scst/usr/param.c +++ b/iscsi-scst/usr/param.c @@ -337,7 +337,7 @@ static struct iscsi_key_ops marker_ops = { .set_val = marker_set_val, }; -#define SET_KEY_VALUES(x) DEFAULT_##x,DEFAULT_##x,MIN_##x,MAX_##x +#define SET_KEY_VALUES(x) DEFAULT_##x, DEFAULT_##x, MIN_##x, MAX_##x /* * List of local target keys with initial values. diff --git a/iscsi-scst/usr/sha1.c b/iscsi-scst/usr/sha1.c index 52771c459..e92dbac83 100644 --- a/iscsi-scst/usr/sha1.c +++ b/iscsi-scst/usr/sha1.c @@ -17,9 +17,9 @@ #include "sha1.h" /* SHA1 transforms */ -#define F1(x,y,z) (z ^ (x & (y ^ z))) /* x ? y : z */ -#define F2(x,y,z) (x ^ y ^ z) /* XOR */ -#define F3(x,y,z) ((x & y) + (z & (x ^ y))) /* majority */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) /* x ? y : z */ +#define F2(x, y, z) (x ^ y ^ z) /* XOR */ +#define F3(x, y, z) ((x & y) + (z & (x ^ y))) /* majority */ /* SHA1 per-round constants */ #define K1 0x5A827999UL /* Rounds 0-19: sqrt(2) * 2^30 */ @@ -56,17 +56,17 @@ static void __sha1_transform(u32 hash[SHA1_DIGEST_WORDS], e = d; d = c; c = rol32(b, 30); b = a; a = t; } - for (; i < 40; i ++) { + for (; i < 40; i++) { t = F2(b, c, d) + K2 + rol32(a, 5) + e + W[i]; e = d; d = c; c = rol32(b, 30); b = a; a = t; } - for (; i < 60; i ++) { + for (; i < 60; i++) { t = F3(b, c, d) + K3 + rol32(a, 5) + e + W[i]; e = d; d = c; c = rol32(b, 30); b = a; a = t; } - for (; i < 80; i ++) { + for (; i < 80; i++) { t = F2(b, c, d) + K4 + rol32(a, 5) + e + W[i]; e = d; d = c; c = rol32(b, 30); b = a; a = t; } diff --git a/iscsi-scst/usr/target.c b/iscsi-scst/usr/target.c index ad1698e13..25558e629 100644 --- a/iscsi-scst/usr/target.c +++ b/iscsi-scst/usr/target.c @@ -292,7 +292,7 @@ void target_list_build(struct connection *conn, char *target_name) else if (strcmp(conn->target_portal, portal) && !is_addr_loopback(portal) && target_portal_allowed(target, portal, - conn->initiator)) + conn->initiator)) target_print_addr(conn, portal, family); } }