From owner-svn-src-head@freebsd.org Tue Dec 3 22:02:49 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 623401BF299; Tue, 3 Dec 2019 22:02:49 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47SGF51yvdz41WX; Tue, 3 Dec 2019 22:02:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f172.google.com with SMTP id k196so4912841oib.2; Tue, 03 Dec 2019 14:02:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=wRBsCK4FE4Gj1JGo5TzcBI3aVB7QWozihgqcFzAUvjE=; b=a6/b3dAZTUOIFe6bd9x9EkzqEBlu2HgoRPd2NfQpxN0hG9ROvvQEQnvgDKCfdmp1xL ATPGGr7ITtztEE+0DAbihgaF3Bs/jUtgQBZpxYM2wF8nsTMHh8RfLZbfOpuM3q5QupNi ryHjp4MebEoKkPNPdFXwK1TU0PETx9+A7VkifWlqaK0ecgJ21id8QMCk8n7IC6FP7u3M ldfGSv5VxsVsGH4q1IaUzl1lIP4LaFXNZQw3dQ65ay5njTSUUPh0TuBRHIr7c5rCFTDz IDzxq2bkkUSaIKwGv7Ycvk4xNq4xZ2bxLK2EtKDUXNoXfzMg8f4MX7+jZAGajg/vGGQ4 TWVg== X-Gm-Message-State: APjAAAWUw56gsjgeFSk3I28MtTUo0effekegduL1iJu8smo8unWHhLUf Iz8JQvU2Y4rJi1AUr5PKRrFZQ0Kv X-Google-Smtp-Source: APXvYqzSIzpYx/8LQoJ0HEizxHZKMlRe8Rl/Dh81DgFlLkPcwe4wvMlsswjnL0xi5RV1sgUIrPEVbg== X-Received: by 2002:aca:de88:: with SMTP id v130mr179538oig.108.1575410566822; Tue, 03 Dec 2019 14:02:46 -0800 (PST) Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com. [209.85.210.45]) by smtp.gmail.com with ESMTPSA id f1sm1530994otq.4.2019.12.03.14.02.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2019 14:02:46 -0800 (PST) Received: by mail-ot1-f45.google.com with SMTP id 59so4395572otp.12; Tue, 03 Dec 2019 14:02:46 -0800 (PST) X-Received: by 2002:a9d:549:: with SMTP id 67mr42899otw.175.1575410566345; Tue, 03 Dec 2019 14:02:46 -0800 (PST) MIME-Version: 1.0 References: <201912030703.xB373P5N043316@repo.freebsd.org> In-Reply-To: <201912030703.xB373P5N043316@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 3 Dec 2019 14:02:35 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r355318 - head/sbin/newfs_msdos To: Xin LI Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47SGF51yvdz41WX X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2019 22:02:49 -0000 Hi Xin Li, Is there a reason to prefer exit() over returning from main? I have not surveyed the source tree, but I suspect most programs in base exit by returning from main rather than explicit exit(3). Thanks, Conrad On Mon, Dec 2, 2019 at 11:03 PM Xin LI wrote: > > Author: delphij > Date: Tue Dec 3 07:03:25 2019 > New Revision: 355318 > URL: https://svnweb.freebsd.org/changeset/base/355318 > > Log: > Explicitly exit() instead of return in main(). > > MFC after: 2 weeks > > Modified: > head/sbin/newfs_msdos/newfs_msdos.c > > Modified: head/sbin/newfs_msdos/newfs_msdos.c > ============================================================================== > --- head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 3 07:01:28 2019 (r355317) > +++ head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 3 07:03:25 2019 (r355318) > @@ -189,7 +189,7 @@ main(int argc, char *argv[]) > err(1, NULL); > } > dtype = *argv; > - return !!mkfs_msdos(fname, dtype, &o); > + exit(!!mkfs_msdos(fname, dtype, &o)); > } > > /*