From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7832 invoked from network); 30 Mar 2023 08:15:18 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 30 Mar 2023 08:15:18 -0000 Received: (qmail 30462 invoked by uid 550); 30 Mar 2023 08:15:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 30430 invoked from network); 30 Mar 2023 08:15:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680164103; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=xARpaQVG/wCV3wCUHpJtSnI5PzY5bXGuv/hYqd1PRY4=; b=MdUu/DzgqFtV6QlIv1QmuIWkIP1+mxrgE8KZ2ZIOqHBw/DUiaWUfaW0UOjGJpZ+PUz b49Pf1h1JcQMHnbdYrELiBrbK2d7GBvYUecjIlgp5WylkqATm8nU9+R3gQRCtig3tIOi uCNAWR3JmK4fDbVoK3oxi17F9OqI5OQdCg61GUYkienzHSCWTNEtAtVhJk+HnwKJqsK4 ANxcmHh9oN2iGhsVnYw96Vfp71OEEk/KxECVThoJZYoVdYz00iWbfEL3Jujwg0te2ewQ RsMhHrNLtt3nf0Sq0RD4mkCXzY9WBmtl16VVA1XOOyxhOt6A9kc+itsCdTwNO4PDMDd0 Pufg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680164103; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xARpaQVG/wCV3wCUHpJtSnI5PzY5bXGuv/hYqd1PRY4=; b=akYsXNoaygD2vccX4CmUBu0MEbaapTTmrvgTa14m05wjgCDr2DqJG8bCsIqWSouY/2 /eT+cIaqRRml2N6hnFxH3zVZz9lj2DcDET6Wl3loOkUjwxGeYDxlKlkTvcFj/xAsqiDt 9g7yw7+6stxkIT4tJD9h2wWgiUxx5hj50L4ugyR7tIpSxJiFsvYcwMIh9zqyaV20L4Cy 3LONFr+8xYoLF0s537RajuKRv1iZMSI0dGS26ibxvkdWPhx9XdlvmIJvyEYGqfybWnWj Dfpcea+ExahCS9yN+XrwW22BuAuXmAOkdUqrz9bNUbpDX8AyxPC+ZOgFbhTLam8dkI/o 4inQ== X-Gm-Message-State: AAQBX9eKN/AqFlufAx9qUWUphcsAxT5mG/2nehweW6hMU7jihBngjCfq 0gFhxsBLW92yCxojPrIHnWwBMKDNWk4ofn96Z+Y= X-Google-Smtp-Source: AKy350ZcSD8mqwS4iUSu9UFeKo0i0VzsdZUGqHtpwcbPGiQZFM5Cbv541P5dWTguAdTMD3juoj5XNa1Ey43wzi+PzGk= X-Received: by 2002:a67:d20f:0:b0:425:d58d:557d with SMTP id y15-20020a67d20f000000b00425d58d557dmr11923595vsi.0.1680164103527; Thu, 30 Mar 2023 01:15:03 -0700 (PDT) MIME-Version: 1.0 References: <20230329151751.392944-1-matthias.goergens@gmail.com> <20230329170418.GD3630668@port70.net> <20230329171643.GE3630668@port70.net> In-Reply-To: <20230329171643.GE3630668@port70.net> From: =?UTF-8?Q?Matthias_G=C3=B6rgens?= Date: Thu, 30 Mar 2023 16:14:52 +0800 Message-ID: To: Matthias Goergens , musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] [PATCH] mntent: deal with escaped whitespace in mtab and fstab On Thu, 30 Mar 2023, 01:16 Szabolcs Nagy, wrote: > > * Szabolcs Nagy [2023-03-29 19:04:18 +0200]: > > > - return fprintf(f, "%s\t%s\t%s\t%s\t%d\t%d\n", > > > - mnt->mnt_fsname, mnt->mnt_dir, mnt->mnt_type, mnt->mnt_opts, > > > - mnt->mnt_freq, mnt->mnt_passno) < 0; > > > > the original code has a bug here: fprintf returns number of > > chars printed but addmntent returns 0 to indicate success. > > sorry missed the < 0. I made that exact same error when first reading the code. I wonder whether we should put the zero in front, to make it clearer to readers? Like `0 > fprintf(...`