srogue: remove unnecessary pointer cast.
Casting char* to int before a comparison doesn't alter the result, and isn't safe if sizeof(char *) != sizeof(int).
This commit is contained in:
parent
67ec840c3c
commit
dff96acf36
1 changed files with 1 additions and 1 deletions
|
|
@ -124,7 +124,7 @@ WINDOW *awin;
|
||||||
*/
|
*/
|
||||||
for (sp = buf; (c=readchar(awin)) != '\n' && c != '\r' && c != ESCAPE;
|
for (sp = buf; (c=readchar(awin)) != '\n' && c != '\r' && c != ESCAPE;
|
||||||
wclrtoeol(awin), draw(awin)) {
|
wclrtoeol(awin), draw(awin)) {
|
||||||
if (( (int)sp - (int)buf ) >= 50) {
|
if (sp - buf >= 50) {
|
||||||
*sp = '\0'; /* line was too long */
|
*sp = '\0'; /* line was too long */
|
||||||
strucpy(opt,buf,strlen(buf));
|
strucpy(opt,buf,strlen(buf));
|
||||||
mvwaddstr(awin, 0, 0, "Name was truncated --More--");
|
mvwaddstr(awin, 0, 0, "Name was truncated --More--");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue