iscsi-scstd: Fix checkpatch complaints about whitespace

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6847 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2016-03-27 16:10:45 +00:00
parent 3ab98d8174
commit 2681ed8bcb
5 changed files with 28 additions and 28 deletions

View File

@@ -171,7 +171,7 @@ static inline void encode_hex_string(u8 *intnum, long length, char *string)
strptr = string;
for (i = 0; i < length; i++, strptr += 2)
sprintf(strptr, "%.2hhx", intnum[i]);
sprintf(strptr, "%.2hhx", intnum[i]);
}
/* Base64 encoding, taken from UNH iSCSI "IntegerToBase64String()" */
@@ -339,15 +339,15 @@ static inline void chap_calc_digest_sha1(char chap_id, const char *secret, int s
*/
static int chap_rand(void)
{
int fd;
int r;
int fd;
int r;
fd = open("/dev/urandom", O_RDONLY);
assert(fd != -1);
if (read(fd, &r, sizeof(r)) < sizeof(r)) {
}
close(fd);
return r;
fd = open("/dev/urandom", O_RDONLY);
assert(fd != -1);
if (read(fd, &r, sizeof(r)) < sizeof(r)) {
}
close(fd);
return r;
}
static int chap_initiator_auth_create_challenge(struct connection *conn)
@@ -639,7 +639,7 @@ int cmnd_exec_auth_chap(struct connection *conn)
{
int res;
switch(conn->auth_state) {
switch (conn->auth_state) {
case CHAP_AUTH_STATE_START:
res = chap_initiator_auth_create_challenge(conn);
break;

View File

@@ -298,7 +298,7 @@ int kernel_params_get(u32 tid, u64 sid, int type, struct iscsi_param *params)
if ((err = ioctl(ctrl_fd, ISCSI_PARAM_GET, &info)) < 0) {
err = -errno;
log_debug(1, "Can't get session params for session 0x%" PRIx64
log_debug(1, "Can't get session params for session 0x%" PRIx64
" (tid %u, err %d): %s\n", sid, tid, err, strerror(errno));
}

View File

@@ -57,7 +57,7 @@ static int nl_write(int fd, void *data, int len)
nlh.nlmsg_type = 0;
memset(&msg, 0, sizeof(msg));
msg.msg_name= (void *)&dest_addr;
msg.msg_name = (void *)&dest_addr;
msg.msg_namelen = sizeof(dest_addr);
msg.msg_iov = iov;
msg.msg_iovlen = 2;

View File

@@ -40,7 +40,7 @@
#include "iscsid.h"
#include "iscsi_adm.h"
static char* server_address;
static char *server_address;
uint16_t server_port = ISCSI_LISTEN_PORT;
struct pollfd poll_array[POLL_MAX];
@@ -620,7 +620,7 @@ again:
switch (conn->state) {
case STATE_KERNEL:
conn_pass_to_kern(conn, pollfd->fd);
if(conn->passed_to_kern)
if (conn->passed_to_kern)
conn->state = STATE_CLOSE;
else
conn->state = STATE_EXIT;

View File

@@ -576,7 +576,7 @@ static void login_start(struct connection *conn)
if (!config_initiator_access_allowed(conn->tid, conn->fd) ||
!target_portal_allowed(target, conn->target_portal,
conn->initiator) ||
conn->initiator) ||
!isns_scn_access_allowed(conn->tid, name)) {
log_info("Initiator %s not allowed to connect to "
"target %s", name, target_name);
@@ -698,21 +698,21 @@ static void cmnd_reject(struct connection *conn, u8 reason)
static int cmnd_exec_auth(struct connection *conn)
{
int res;
int res;
switch (conn->auth_method) {
case AUTH_CHAP:
res = cmnd_exec_auth_chap(conn);
break;
case AUTH_NONE:
res = 0;
break;
default:
log_error("Unknown auth. method %d", conn->auth_method);
res = -3;
}
switch (conn->auth_method) {
case AUTH_CHAP:
res = cmnd_exec_auth_chap(conn);
break;
case AUTH_NONE:
res = 0;
break;
default:
log_error("Unknown auth. method %d", conn->auth_method);
res = -3;
}
return res;
return res;
}
static void cmnd_exec_login(struct connection *conn)