afs: Negate codes using a clear, standard method
[openafs.git] / src / afs / DARWIN / osi_file.c
index bc271f0..14be585 100644 (file)
@@ -347,7 +347,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
        afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
                   ICL_TYPE_INT32, code);
        if (code > 0) {
-           code *= -1;
+           code = -code;
        }
     }
     return code;
@@ -390,7 +390,7 @@ afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
        afile->offset += code;
     } else {
        if (code > 0) {
-           code *= -1;
+           code = -code;
        }
     }
     if (afile->proc) {