afs: Negate codes using a clear, standard method
[openafs.git] / src / afs / IRIX / osi_file.c
index 8698493..02ea9b6 100644 (file)
@@ -161,7 +161,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;
@@ -194,7 +194,7 @@ afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
            afs_warnuser
                ("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n");
        if (code > 0) {
-           code *= -1;
+           code = -code;
        }
     }
     if (afile->proc) {