mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-31 06:28:48 +01:00
Addressed compiler warnings:
address of array '...' will always evaluate to 'true' [-Wpointer-bool-conversion]
This commit is contained in:
parent
d6a58122b2
commit
8d5b184cc7
4 changed files with 7 additions and 10 deletions
|
|
@ -1481,7 +1481,7 @@ ACMD(do_users)
|
|||
"UNDEFINED",
|
||||
state, idletime, timestr);
|
||||
|
||||
if (d->host && *d->host)
|
||||
if (*d->host)
|
||||
sprintf(line + strlen(line), "[%s]\r\n", d->host);
|
||||
else
|
||||
strcat(line, "[Hostname unknown]\r\n");
|
||||
|
|
|
|||
|
|
@ -4983,7 +4983,7 @@ ACMD(do_recent)
|
|||
ct = this->time;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
if (ch->desc->host && *ch->desc->host) {
|
||||
if (*ch->desc->host) {
|
||||
if (!GET_HOST(ch))
|
||||
GET_HOST(ch) = strdup(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 */
|
||||
if (player.name)
|
||||
fprintf(outfile, "Name: %s\n", player.name);
|
||||
if (player.pwd)
|
||||
fprintf(outfile, "Pass: %s\n", player.pwd);
|
||||
if (player.title)
|
||||
fprintf(outfile, "Titl: %s\n", player.title);
|
||||
if (player.description && *player.description)
|
||||
fprintf(outfile, "Name: %s\n", player.name);
|
||||
fprintf(outfile, "Pass: %s\n", player.pwd);
|
||||
fprintf(outfile, "Titl: %s\n", player.title);
|
||||
if (*player.description)
|
||||
fprintf(outfile, "Desc:\n%s~\n", player.description);
|
||||
if (player.sex != PFDEF_SEX)
|
||||
fprintf(outfile, "Sex : %d\n", (int)player.sex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue