From c0dd54b15c4c5d26014706f56833298217312fb0 Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 25 May 2006 00:42:23 +0000 Subject: [PATCH] Coverity CID 3214: Check getrawpartition return code. --- usr.sbin/mscdlabel/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/mscdlabel/main.c b/usr.sbin/mscdlabel/main.c index 2daf8431f437..7e4f78dcf5bb 100644 --- a/usr.sbin/mscdlabel/main.c +++ b/usr.sbin/mscdlabel/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.3 2005/07/25 11:26:40 drochner Exp $ */ +/* $NetBSD: main.c,v 1.4 2006/05/25 00:42:23 christos Exp $ */ /* * Copyright (c) 2002, 2005 @@ -169,7 +169,8 @@ main(argc, argv) * to have more than one data track in one session, so we get * the same result. */ - rawpart = getrawpartition(); + if ((rawpart = getrawpartition()) == -1) + err(1, "Cannot get raw partition"); i = ntracks; j = 0; while (--i >= 0 && j < MAXPARTITIONS) {