From patchwork Fri Nov 11 18:55:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Decotigny X-Patchwork-Id: 693910 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tFqGG6C9fz9t2N for ; Sat, 12 Nov 2016 06:09:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SIPSRNse"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935596AbcKKTJF (ORCPT ); Fri, 11 Nov 2016 14:09:05 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35993 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934591AbcKKTJE (ORCPT ); Fri, 11 Nov 2016 14:09:04 -0500 Received: by mail-pg0-f66.google.com with SMTP id x23so2490957pgx.3 for ; Fri, 11 Nov 2016 11:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=8867DJodRpscYszIDZ9EW0KrfIAOiVV7FlmKE94cXSE=; b=SIPSRNsehfbGnqVyBcsCHqiqnlnOXLlH9pMYE0syqpFrahvT2mEfOGGQs0t6ikHXRi PpHi1L7o+BsWuIGdcAlEN/keC0yFVrX8ORrLZ0KLtCy1UVYMTomw6z3n80yKUfzKt35a 1PIrAB8jbNzNslUFocrGoUyGDA7LWoAzAaBbWrysrnKf/8aHxpDHntETizThbGpeirov vPoAHdJB+Mw1Ym0O0Nu2YOojuSjAQq2DEJQRPZfZTWsRTlB0OaiH+jxDyi+pCKJoSYgS QNJvwPnpOjHPJ29SVN7Eeg0Wni3aO8wTtlc6qiuBpHBNUmN/L5vrJdHg0xFgXSbBkWAq TUUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8867DJodRpscYszIDZ9EW0KrfIAOiVV7FlmKE94cXSE=; b=hUGXGcPJFNgvulfLjpYAB3eisulLapo0++Do5MHFHlzS8oI2tLjepcz/ooQaawSemr atR+yRViLNFTf2QzkVZMwHWS8vvLvJAjikIARndMzlAaYSwpaoZsZCAEYwkO3Qaozi51 bitMamBU44SFw7vjc6/KEGijioObunP69uue8qOo+Zrcsua0zDeNGnYI1aVLDT3zmH9b yMVOQ0EfC9iQjfL+XxkdJDNZkUM/ufEyQTuQpKPVa1Jrb88Uyh0L6spM29ME61iAsuNV 6tXDbYYplg9t92UUpvIfAZHa9+Bo1+QBDpDA26Gufx5t201LJofYMH0lZz/u1cNTcwXs hcoA== X-Gm-Message-State: ABUngvfAz6Ul1S7d5r0YPKxxBnPGwtlJlIboCPCLjJ6Ug4pXhZvlFaqGkzN6EQYmB1NB4g== X-Received: by 10.98.15.5 with SMTP id x5mr9555021pfi.140.1478890549376; Fri, 11 Nov 2016 10:55:49 -0800 (PST) Received: from decot.svl.corp.google.com ([100.123.242.54]) by smtp.gmail.com with ESMTPSA id v6sm16862467paz.45.2016.11.11.10.55.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Nov 2016 10:55:48 -0800 (PST) From: David Decotigny To: Stephen Hemminger , Alexey Kuznetsov Cc: netdev@vger.kernel.org, David Decotigny Subject: [PATCH iproute2 v1 1/2] iproute2: avoid exit in case of error. Date: Fri, 11 Nov 2016 10:55:36 -0800 Message-Id: <1478890537-88715-1-git-send-email-ddecotig@gmail.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Be consistent with how non-0 print_route() return values are handled elesewhere: return -1. --- ip/iproute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iproute.c b/ip/iproute.c index 98bfad6..dae793b 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -1743,7 +1743,7 @@ static int iproute_get(int argc, char **argv) if (print_route(NULL, &req.n, (void *)stdout) < 0) { fprintf(stderr, "An error :-)\n"); - exit(1); + return -1; } if (req.n.nlmsg_type != RTM_NEWROUTE) {