iscsi-scst: Remove unnecessary %s format modifiers

See also https://github.com/bvanassche/scst/pull/18.

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8903 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Konstantin Kharlamov
2020-05-12 14:57:00 +00:00
committed by Bart Van Assche
parent 90f5d5f5bf
commit af1dfc9873
5 changed files with 10 additions and 10 deletions

View File

@@ -59,16 +59,16 @@ static ssize_t iscsi_open_state_show(struct kobject *kobj,
{
switch (ctr_open_state) {
case ISCSI_CTR_OPEN_STATE_CLOSED:
sprintf(buf, "%s\n", "closed");
sprintf(buf, "closed\n");
break;
case ISCSI_CTR_OPEN_STATE_OPEN:
sprintf(buf, "%s\n", "open");
sprintf(buf, "open\n");
break;
case ISCSI_CTR_OPEN_STATE_CLOSING:
sprintf(buf, "%s\n", "closing");
sprintf(buf, "closing\n");
break;
default:
sprintf(buf, "%s\n", "unknown");
sprintf(buf, "unknown\n");
break;
}

View File

@@ -39,7 +39,7 @@ static int print_conn_state(char *p, size_t size, struct iscsi_conn *conn)
int pos = 0;
if (conn->closing) {
pos += scnprintf(p, size, "%s", "closing");
pos += scnprintf(p, size, "closing");
goto out;
}

View File

@@ -66,14 +66,14 @@ const char *iscsi_get_digest_name(int val, char *res)
int pos = 0;
if (val & DIGEST_NONE)
pos = sprintf(&res[pos], "%s", "None");
pos = sprintf(&res[pos], "None");
if (val & DIGEST_CRC32C)
pos += sprintf(&res[pos], "%s%s", (pos != 0) ? ", " : "",
"CRC32C");
if (pos == 0)
sprintf(&res[pos], "%s", "Unknown");
sprintf(&res[pos], "Unknown");
return res;
}

View File

@@ -624,7 +624,7 @@ static int handle_e_get_attr_value(int fd, const struct iscsi_kern_event *event)
isns_access_control ? ISCSI_ISNS_SYSFS_ACCESS_CONTROL_ENABLED : "");
add_key_mark(res_str, sizeof(res_str), 0);
} else
snprintf(res_str, sizeof(res_str), "%s\n", "");
snprintf(res_str, sizeof(res_str), "\n");
} else if (strcasecmp(ISCSI_ISNS_ENTITY_ATTR_NAME, pp) == 0) {
if (target != NULL) {
log_error("Not NULL target %s for global attribute %s",

View File

@@ -181,7 +181,7 @@ static int digest_val_to_str(unsigned int val, char *str, int len)
if (val & DIGEST_NONE) {
len -= pos;
pos = snprintf(&str[pos], len, "%s", "None");
pos = snprintf(&str[pos], len, "None");
}
if (pos >= len)
@@ -197,7 +197,7 @@ static int digest_val_to_str(unsigned int val, char *str, int len)
goto out;
if (pos == 0)
pos = snprintf(&str[0], len, "%s", "Unknown");
pos = snprintf(&str[0], len, "Unknown");
out:
return 0;