upas: fix warnings

smtp.c:232: warning: comparison with string literal results in unspecified behavior
smtp.c:244: warning: comparison with string literal results in unspecified behavior
marshal.c:1179: warning: variable ‘err’ set but not used

LGTM=rsc
R=rsc
https://codereview.appspot.com/93290043
This commit is contained in:
David du Colombier 2014-05-15 06:28:54 +02:00
parent 954e03ccfe
commit bae34df843
2 changed files with 3 additions and 3 deletions

View file

@ -1183,7 +1183,7 @@ waitforsubprocs(void)
err = w->msg; err = w->msg;
if(pid >= 0 && (w=procwait(pid)) && w->msg[0]) if(pid >= 0 && (w=procwait(pid)) && w->msg[0])
err = w->msg; err = w->msg;
return nil; return err;
} }
int int

View file

@ -229,7 +229,7 @@ threadmain(int argc, char **argv)
for(i = 0; i < argc; i++){ for(i = 0; i < argc; i++){
if((trv = rcptto(argv[i])) != 0){ if((trv = rcptto(argv[i])) != 0){
/* remember worst error */ /* remember worst error */
if(rv != Giveup) if(strcmp(rv, Giveup) != 0)
rv = trv; rv = trv;
errs[rcvrs] = strdup(s_to_c(reply)); errs[rcvrs] = strdup(s_to_c(reply));
removenewline(errs[rcvrs]); removenewline(errs[rcvrs]);
@ -241,7 +241,7 @@ threadmain(int argc, char **argv)
} }
/* if no ok rcvrs or worst error is retry, give up */ /* if no ok rcvrs or worst error is retry, give up */
if(ok == 0 || rv == Retry) if(ok == 0 || strcmp(rv, Retry) == 0)
goto error; goto error;
if(ping){ if(ping){