afs: Negate codes using a clear, standard method
[openafs.git] / src / afs / SOLARIS / osi_file.c
index b497b63..3566983 100644 (file)
@@ -382,7 +382,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;
@@ -412,7 +412,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) {