mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-23 03:51:52 +01:00
Addressed compiler warnings:
address of array '...' will always evaluate to 'true' [-Wpointer-bool-conversion]
This commit is contained in:
@@ -1481,7 +1481,7 @@ ACMD(do_users)
|
|||||||
"UNDEFINED",
|
"UNDEFINED",
|
||||||
state, idletime, timestr);
|
state, idletime, timestr);
|
||||||
|
|
||||||
if (d->host && *d->host)
|
if (*d->host)
|
||||||
sprintf(line + strlen(line), "[%s]\r\n", d->host);
|
sprintf(line + strlen(line), "[%s]\r\n", d->host);
|
||||||
else
|
else
|
||||||
strcat(line, "[Hostname unknown]\r\n");
|
strcat(line, "[Hostname unknown]\r\n");
|
||||||
|
|||||||
@@ -4983,7 +4983,7 @@ ACMD(do_recent)
|
|||||||
ct = this->time;
|
ct = this->time;
|
||||||
strftime(timestr, sizeof(timestr), "%a %b %d %H:%M:%S %Y", localtime(&ct));
|
strftime(timestr, sizeof(timestr), "%a %b %d %H:%M:%S %Y", localtime(&ct));
|
||||||
|
|
||||||
if (this->host && *(this->host)) {
|
if (*(this->host)) {
|
||||||
if (!strcmp(this->host, "localhost")) loc = TRUE;
|
if (!strcmp(this->host, "localhost")) loc = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ void save_char(struct char_data * ch)
|
|||||||
|
|
||||||
/* If ch->desc is not null, then update session data before saving. */
|
/* If ch->desc is not null, then update session data before saving. */
|
||||||
if (ch->desc) {
|
if (ch->desc) {
|
||||||
if (ch->desc->host && *ch->desc->host) {
|
if (*ch->desc->host) {
|
||||||
if (!GET_HOST(ch))
|
if (!GET_HOST(ch))
|
||||||
GET_HOST(ch) = strdup(ch->desc->host);
|
GET_HOST(ch) = strdup(ch->desc->host);
|
||||||
else if (GET_HOST(ch) && strcmp(GET_HOST(ch), ch->desc->host)) {
|
else if (GET_HOST(ch) && strcmp(GET_HOST(ch), ch->desc->host)) {
|
||||||
|
|||||||
@@ -196,13 +196,10 @@ void convert(char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* char_file_u */
|
/* char_file_u */
|
||||||
if (player.name)
|
fprintf(outfile, "Name: %s\n", player.name);
|
||||||
fprintf(outfile, "Name: %s\n", player.name);
|
fprintf(outfile, "Pass: %s\n", player.pwd);
|
||||||
if (player.pwd)
|
fprintf(outfile, "Titl: %s\n", player.title);
|
||||||
fprintf(outfile, "Pass: %s\n", player.pwd);
|
if (*player.description)
|
||||||
if (player.title)
|
|
||||||
fprintf(outfile, "Titl: %s\n", player.title);
|
|
||||||
if (player.description && *player.description)
|
|
||||||
fprintf(outfile, "Desc:\n%s~\n", player.description);
|
fprintf(outfile, "Desc:\n%s~\n", player.description);
|
||||||
if (player.sex != PFDEF_SEX)
|
if (player.sex != PFDEF_SEX)
|
||||||
fprintf(outfile, "Sex : %d\n", (int)player.sex);
|
fprintf(outfile, "Sex : %d\n", (int)player.sex);
|
||||||
|
|||||||
Reference in New Issue
Block a user