From patchwork Thu Nov 8 18:32:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 1716931 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 13A903FCDE for ; Thu, 8 Nov 2012 18:33:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756600Ab2KHSdA (ORCPT ); Thu, 8 Nov 2012 13:33:00 -0500 Received: from prdiron-1.llnl.gov ([128.15.143.171]:31660 "EHLO prdiron-1.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756585Ab2KHSc7 (ORCPT ); Thu, 8 Nov 2012 13:32:59 -0500 X-Attachments: Received: from auk59.llnl.gov (HELO [134.9.93.24]) ([134.9.93.24]) by prdiron-1.llnl.gov with ESMTP; 08 Nov 2012 10:32:58 -0800 Subject: [PATCH] opensm/osm_perfmgr_db.c: Fix output error due to possible 32bit int overflow From: Albert Chu To: linux-rdma@vger.kernel.org Date: Thu, 08 Nov 2012 10:32:59 -0800 Message-Id: <1352399579.25353.106.camel@auk59.llnl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Albert L. Chu --- opensm/osm_perfmgr_db.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opensm/osm_perfmgr_db.c b/opensm/osm_perfmgr_db.c index 98b587d..6095e1a 100644 --- a/opensm/osm_perfmgr_db.c +++ b/opensm/osm_perfmgr_db.c @@ -705,7 +705,7 @@ static void dump_hr_dc(FILE *fp, uint64_t val64, int data) uint64_t tmp = val64; float val = 0.0; int ui = 0; - int div = 1; + uint64_t div = 1; tmp /= 1024; while (tmp) {