{"id":812819,"url":"http://patchwork.ozlabs.org/api/patches/812819/?format=json","web_url":"http://patchwork.ozlabs.org/project/swupdate/patch/20170912123554.7388-1-christian.storm@siemens.com/","project":{"id":58,"url":"http://patchwork.ozlabs.org/api/projects/58/?format=json","name":"swupdate development","link_name":"swupdate","list_id":"swupdate.googlegroups.com","list_email":"swupdate@googlegroups.com","web_url":"https://github.com/sbabic/swupdate","scm_url":"git://github.com/sbabic/swupdate","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170912123554.7388-1-christian.storm@siemens.com>","list_archive_url":null,"date":"2017-09-12T12:35:54","name":"tmpdir: fix asprintf return value check","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"f404ab911feb2c0ae8999ef355b891d8fad69c24","submitter":{"id":72180,"url":"http://patchwork.ozlabs.org/api/people/72180/?format=json","name":"Storm, Christian","email":"christian.storm@siemens.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/swupdate/patch/20170912123554.7388-1-christian.storm@siemens.com/mbox/","series":[{"id":2689,"url":"http://patchwork.ozlabs.org/api/series/2689/?format=json","web_url":"http://patchwork.ozlabs.org/project/swupdate/list/?series=2689","date":"2017-09-12T12:35:54","name":"tmpdir: fix asprintf return value check","version":1,"mbox":"http://patchwork.ozlabs.org/series/2689/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/812819/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/812819/checks/","tags":{},"related":[],"headers":{"Return-Path":"<swupdate+bncBDD6BWV65QPBBQVK37GQKGQEUCMMIZA@googlegroups.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23d;\n\thelo=mail-lf0-x23d.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbqvk37gqkgqeucmmiza@googlegroups.com;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"FgrEe1P4\"; dkim-atps=neutral"],"Received":["from mail-lf0-x23d.google.com (mail-lf0-x23d.google.com\n\t[IPv6:2a00:1450:4010:c07::23d])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs49m6XY4z9t2l\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 22:38:29 +1000 (AEST)","by mail-lf0-x23d.google.com with SMTP id a18sf356812lfl.0\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 05:38:29 -0700 (PDT)","by 10.46.76.9 with SMTP id z9ls100037lja.24.gmail; Tue, 12 Sep 2017\n\t05:38:26 -0700 (PDT)","from thoth.sbs.de (thoth.sbs.de. [192.35.17.2])\n\tby gmr-mx.google.com with ESMTPS id\n\t74si861959wmf.8.2017.09.12.05.38.26 for <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Sep 2017 05:38:26 -0700 (PDT)","from mail1.siemens.de (mail1.siemens.de [139.23.33.14])\n\tby thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v8CCcPYd025682\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Tue, 12 Sep 2017 14:38:25 +0200","from MD1KR9XC.ad001.siemens.net ([139.25.69.251])\n\tby mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v8CCcPX4023136;\n\tTue, 12 Sep 2017 14:38:25 +0200"],"ARC-Seal":["i=2; a=rsa-sha256; t=1505219906; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=Qb0MuDjSwy/NOdhPkH+fl60d8QmR2M8any0PVlOgqS8qENAuU5XEj/30ZWIk5D4H7A\n\td5SPtjwbcsTXImQ0Qj3Tit4ZrRjeBsLz/wODpLYsLW2yoWSUsIsdQHsVAReniHtVrd3H\n\t0cqsQqKE8LbR8mK4hrKGHMoY5RQ6jziX2pTFbJQymEG3r3d6SKOSGI41zhhdap4TVwk8\n\tIeDtNW37eCaoF9anPX6RC5++T2/IKm6FV1X5++4PjNb8IYqpDUnvXNt7NkLPf8J0nOha\n\taPBJ2ymEj92pRseyWK+lXTXk1qAUSH8mFKg+vJSqz8iYKHwhYtJ8FydM4tnD6ZTivOj+\n\tJQ7Q==","i=1; a=rsa-sha256; t=1505219906; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=wecejA2FqwWktJxbGcRkMEfASXrVrqGKIQFxc+AbGe/Or0sJfWQQ42t0ZAexlXPQUh\n\tfxai98pi1WddcEY77HFuqiBJOjWGEKeKQfY3D0m8WRsAG15o49m+5qrFUF+L3WkLFWOy\n\tHmjpg7bg9CrZ/Tx4zrlO7UOgyBXPNltfKg5CGGCv3tjJpeZTACjXiqU6+DneyOM2T0Ub\n\tsoqmSNmI1Qz/xDJYMvZurpe/6dNHSrxW/mTfnhDx5PY2GeZuxfaVmWasLVX+Gpgg/RNt\n\tPUz1Z/17eYs7urNfMrmI6cHUIOpucJkk1hc2qtADKyRABvw9rTOPK6dGoRqUdztb3w3D\n\tAmSw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:message-id:date:subject:cc:to:from\n\t:arc-authentication-results:arc-message-signature:mime-version\n\t:sender:dkim-signature:arc-authentication-results;\n\tbh=0X7qngHlMeC4NvZNth1Wb36WULO5Uj6ieGZ6GLKLb0k=;\n\tb=hSl40epv6rkeuf8FyXdvGtURIr9m/besR4puDAldofB5JOgJdf7xjEGRLyUp5CmOay\n\t4Rm2X73JDwc8+40rugWOhFmPfI6BBRV62T6/3Mt6VS7hoRe0A/k7So7RJ1zgMZ3ByUf8\n\t4lnNjd32gUvJ0ZfYFsPKyLNF6YM5UqCVkqu+QsD8qfRbHb9iTlUoQ93Sunq+fs51MKsN\n\tl6MJcI7Wtmcgx1xL0nRlK05m+aI17e04rTPqniTc1zh75GQVKyVwi+g0ZmQ5LHh9c/90\n\tDrYqy0QmcDAikPYlQXK6OGKuUXKGyyEan1kxfSsRV8nC4gr7QsR11Bxzbr2YAoXA9JR7\n\tQFXQ==","i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=message-id:date:subject:cc:to:from:arc-authentication-results;\n\tbh=Uhe5lhb9yZ/ncCjlNiYgr9cAKKZK8Mkbwxm/7S/Zit4=;\n\tb=JVwfCC8XcY1/e8H7writI2Kn89kTF1UkkcFDfUXYnkbmxPayHA1nTZmQ1qLexzBSzo\n\tPecbc8JfyWap4PVRCI4iBHhGmAV26HzmIroVeeAaq4X9T8n21XdAcHjpnIR7taWdsx3R\n\tq+RbnZrkvCGcGcd5ORsR4Mk7M3mDZEqckxxBn58/dz97jIg4fDEEQwZDpDlaDzeawBLF\n\tqvfKVkzTS9Z7a+b4F+y95WYFayg8ekHl72GUWgszbd+9zsVST+j1swCszbKY5AionsBt\n\tkA+5kkCWpin6W4rsIrqQlPDG7x42UyXKiN8nbG4MNTJtI6+eLIGnQwyZtiUSNy00W56l\n\t3iRw=="],"ARC-Authentication-Results":["i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.2 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.2 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:mime-version:from:to:cc:subject:date:message-id\n\t:x-original-sender:x-original-authentication-results:precedence\n\t:mailing-list:list-id:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=0X7qngHlMeC4NvZNth1Wb36WULO5Uj6ieGZ6GLKLb0k=;\n\tb=FgrEe1P4Z/HSh2XFrXFH91KkX7zOOchR6CP45iyCR+e6QHsvUtBpHOMqZXSMK1fjGA\n\trNAm2bEfN11derPuhSyZBp3H22iKaxuJdISu33+ldSmJrVxabRzFSUFpd+iNkbJQX2NT\n\tAJXLZWfn2IR440emRvdCojXqctsf/dBSmsA7GbgRGWNlMqjKmv48Fu5mxqODm+JdI1UO\n\tPVY1hdS7qGq53H43Pizc9yBwomOMvp/SjB8bZHIsgjqH7MfZGncaJCGqB60JTAVNCVUE\n\twoh2YzNTJz+Vi3VnoLHbtGgLO5M0fMcxiZh8y1BvzRbTmZ4Vo/HlxrPsIsKckB7MvXD2\n\tIOaA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:mime-version:from:to:cc:subject:date\n\t:message-id:x-original-sender:x-original-authentication-results\n\t:precedence:mailing-list:list-id:x-spam-checked-in-group:list-post\n\t:list-help:list-archive:list-subscribe:list-unsubscribe;\n\tbh=0X7qngHlMeC4NvZNth1Wb36WULO5Uj6ieGZ6GLKLb0k=;\n\tb=soCoQV9J4YV0tPfWDNBUAcgfF3gcH8u1HS/l9GczbUSzQXwKlZDmQeI9pDYHhE6ZtL\n\tj1lJhZYWOn3UP+FSczi8YJuR828eNdD135soeHjQcdF8LG7RfvNsb8JfapXJ3v783YVF\n\tpISjLPVWxGztIzJfwotO4Zi5VH2GRTjm6S3hahZVBz4xHxIxm+v00FaYCvetLO4NVJVx\n\tg7+Ik4jwXIGUMB0vXIHEM2HQuKsbXJ/tbaj3YnY9wadRcypOPl4ov+fneopboG8gnjfj\n\tPh6Pkkve1ooU6o2YS+QDsgJCgbOK2mZXDu+KlWb49BHGbK45qf2HblEHDg8gHlU+NFrT\n\tsMnw==","Sender":"swupdate@googlegroups.com","X-Gm-Message-State":"AHPjjUgD/tSH+f13I9Xs0wDvoapovMHB25gM+VPXYyfl5HcF8Kmai7VZ\n\tuIska9zboHJzyg==","X-Google-Smtp-Source":"AOwi7QD/DTtLDQUkXNkYWVFnQ5pWUn/hn/Fb4aQmfni8kADwFP4O3iUpbh45fWc3HxOsKR/O1dZYlQ==","X-Received":["by 10.46.69.87 with SMTP id s84mr30725lja.27.1505219906662;\n\tTue, 12 Sep 2017 05:38:26 -0700 (PDT)","by 10.25.190.75 with SMTP id o72mr926914lff.18.1505219906183;\n\tTue, 12 Sep 2017 05:38:26 -0700 (PDT)"],"MIME-Version":"1.0","X-BeenThere":"swupdate@googlegroups.com","Received-SPF":"neutral (google.com: 192.35.17.2 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.2; ","From":"Christian Storm <christian.storm@siemens.com>","To":"swupdate@googlegroups.com","Cc":"Christian Storm <christian.storm@siemens.com>","Subject":"[swupdate] [PATCH] tmpdir: fix asprintf return value check","Date":"Tue, 12 Sep 2017 14:35:54 +0200","Message-Id":"<20170912123554.7388-1-christian.storm@siemens.com>","X-Mailer":"git-send-email 2.14.1","X-Original-Sender":"christian.storm@siemens.com","X-Original-Authentication-Results":"gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.2 is neither permitted nor denied by best\n\tguess record\n\tfor domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com","Content-Type":"text/plain; charset=\"UTF-8\"","Precedence":"list","Mailing-list":"list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com","List-ID":"<swupdate.googlegroups.com>","X-Spam-Checked-In-Group":"swupdate@googlegroups.com","X-Google-Group-Id":"605343134186","List-Post":"<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>","List-Help":"<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>","List-Archive":"<https://groups.google.com/group/swupdate","List-Subscribe":"<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>","List-Unsubscribe":"<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"},"content":"Fix travis's complaint about missing asprintf\nreturn value check (-Wunused-result).\n\nSigned-off-by: Christian Storm <christian.storm@siemens.com>\n---\n core/util.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)","diff":"diff --git a/core/util.c b/core/util.c\nindex 8c6b295..821b6df 100644\n--- a/core/util.c\n+++ b/core/util.c\n@@ -71,7 +71,9 @@ const char* get_tmpdir(void)\n \t\treturn TMPDIR;\n \t}\n \n-\tasprintf(&TMPDIR, \"%s/\", env_tmpdir);\n+\tif (asprintf(&TMPDIR, \"%s/\", env_tmpdir) == -1) {\n+\t\tTMPDIR = (char*)\"/tmp/\";\n+\t}\n \treturn TMPDIR;\n }\n \n","prefixes":[]}