From 472b2cfcf8e1e199afc804ec2bd73f15d343c066 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 29 Oct 2018 11:20:47 +0900 Subject: [PATCH] iscsi: Use not C++ style comments // but C-style comments /* */ Change-Id: Ia81209e1dd7c0892bb14ae8b2a5850130fcbf199 Signed-off-by: Shuhei Matsumoto Reviewed-on: https://review.gerrithub.io/431078 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu --- lib/iscsi/conn.c | 2 +- lib/iscsi/init_grp.h | 2 +- lib/iscsi/iscsi.c | 13 +++++++------ lib/iscsi/portal_grp.h | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index d5cd5d1e9..1df42db42 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -263,7 +263,7 @@ spdk_iscsi_conn_construct(struct spdk_iscsi_portal *portal, conn->data_out_cnt = 0; conn->data_in_cnt = 0; pthread_mutex_unlock(&g_spdk_iscsi.mutex); - conn->MaxRecvDataSegmentLength = 8192; // RFC3720(12.12) + conn->MaxRecvDataSegmentLength = 8192; /* RFC3720(12.12) */ conn->portal = portal; conn->pg_tag = portal->group->tag; diff --git a/lib/iscsi/init_grp.h b/lib/iscsi/init_grp.h index ff24ee5b6..dacb100e7 100644 --- a/lib/iscsi/init_grp.h +++ b/lib/iscsi/init_grp.h @@ -76,4 +76,4 @@ void spdk_iscsi_init_grps_destroy(void); void spdk_iscsi_init_grps_config_text(FILE *fp); void spdk_iscsi_init_grps_info_json(struct spdk_json_write_ctx *w); void spdk_iscsi_init_grps_config_json(struct spdk_json_write_ctx *w); -#endif // SPDK_INIT_GRP_H +#endif /* SPDK_INIT_GRP_H */ diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 7d96c9cb2..a428a5521 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -80,7 +80,7 @@ static void spdk_gen_random(uint8_t *buf, size_t len); static void srandomdev(void); #endif /* HAVE_SRANDOMDEV */ #ifndef HAVE_ARC4RANDOM -//static uint32_t arc4random(void); +/* static uint32_t arc4random(void); */ #endif /* HAVE_ARC4RANDOM */ /* convert from/to bin/hex */ @@ -815,12 +815,12 @@ spdk_iscsi_auth_params(struct spdk_iscsi_conn *conn, rc = spdk_iscsi_get_authinfo(conn, val); if (rc < 0) { - //SPDK_ERRLOG("auth user or secret is missing\n"); + /* SPDK_ERRLOG("auth user or secret is missing\n"); */ SPDK_ERRLOG("iscsi_get_authinfo() failed\n"); goto error_return; } if (conn->auth.user[0] == '\0' || conn->auth.secret[0] == '\0') { - //SPDK_ERRLOG("auth user or secret is missing\n"); + /* SPDK_ERRLOG("auth user or secret is missing\n"); */ SPDK_ERRLOG("auth failed (user %.64s)\n", user); goto error_return; } @@ -849,7 +849,7 @@ spdk_iscsi_auth_params(struct spdk_iscsi_conn *conn, /* compare MD5 digest */ if (memcmp(tgtmd5, resmd5, SPDK_MD5DIGEST_LEN) != 0) { /* not match */ - //SPDK_ERRLOG("auth user or secret is missing\n"); + /* SPDK_ERRLOG("auth user or secret is missing\n"); */ SPDK_ERRLOG("auth failed (user %.64s)\n", user); goto error_return; } @@ -880,7 +880,7 @@ spdk_iscsi_auth_params(struct spdk_iscsi_conn *conn, SPDK_DEBUGLOG(SPDK_LOG_ISCSI, "got CHAP_I/CHAP_C\n"); if (conn->auth.muser[0] == '\0' || conn->auth.msecret[0] == '\0') { - //SPDK_ERRLOG("mutual auth user or secret is missing\n"); + /* SPDK_ERRLOG("mutual auth user or secret is missing\n"); */ SPDK_ERRLOG("auth failed (user %.64s)\n", user); goto error_return; } @@ -2364,7 +2364,8 @@ spdk_iscsi_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) } if (conn->id == cid) { - response = 0; // connection or session closed successfully + /* connection or session closed successfully */ + response = 0; spdk_iscsi_conn_logout(conn); } else { response = 1; diff --git a/lib/iscsi/portal_grp.h b/lib/iscsi/portal_grp.h index 08cb39926..ab1142b77 100644 --- a/lib/iscsi/portal_grp.h +++ b/lib/iscsi/portal_grp.h @@ -80,4 +80,4 @@ void spdk_iscsi_portal_grp_close_all(void); void spdk_iscsi_portal_grps_config_text(FILE *fp); void spdk_iscsi_portal_grps_info_json(struct spdk_json_write_ctx *w); void spdk_iscsi_portal_grps_config_json(struct spdk_json_write_ctx *w); -#endif // SPDK_PORTAL_GRP_H +#endif /* SPDK_PORTAL_GRP_H */