From patchwork Wed Aug 6 06:24:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Natanael Copa X-Patchwork-Id: 4683631 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7DFB6C033A for ; Wed, 6 Aug 2014 06:25:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A5DE920115 for ; Wed, 6 Aug 2014 06:25:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5E1C20120 for ; Wed, 6 Aug 2014 06:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754317AbaHFGZW (ORCPT ); Wed, 6 Aug 2014 02:25:22 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:57475 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752963AbaHFGZQ (ORCPT ); Wed, 6 Aug 2014 02:25:16 -0400 Received: by mail-lb0-f179.google.com with SMTP id v6so1518535lbi.10 for ; Tue, 05 Aug 2014 23:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s71xSmrbYoYd/1PXMjqmStiNWxOw6QMlHkqBD1kUvCg=; b=XzrvWbUcJsBh0uRmLqHDCIROZlQWdCZ80Ahf+MapkfUkQ6zcXzcxaHFKBKO9HBzept tMnttWdtikwAG17XyMdO59ivMM2aLPUircP8LI4qqTYG/LWbuUN2s9+RquH38EURcfgw w6lyvsAbHVPRA8wh+Y/X9BiGC2DNGLHVUTgu9KQD1J09i6n7+GKm6beiSaK7dpSDqAPq FeZddeNx7T3Nm/x+xPL12uTobjVAnyf8CMWN2mqWgoyL0br/yTofaKOqzm9baXnochrd vKBjiXQ8pAsRf5dV04p/72Ireh5tZjDMwjQusAlUefmt7d46P9VFH5YnpokfVVEin9gz pLfw== X-Received: by 10.152.26.100 with SMTP id k4mr9266762lag.30.1407306315220; Tue, 05 Aug 2014 23:25:15 -0700 (PDT) Received: from ncopa-desktop.nor.wtbts.net (3.203.202.84.customer.cdi.no. [84.202.203.3]) by mx.google.com with ESMTPSA id qe3sm56640lbb.20.2014.08.05.23.25.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Aug 2014 23:25:14 -0700 (PDT) From: Natanael Copa X-Google-Original-From: Natanael Copa To: linux-nfs@vger.kernel.org Cc: Natanael Copa Subject: [PATCH v2 01/11] conffile: use standard uint*_t and unsigned char Date: Wed, 6 Aug 2014 08:24:56 +0200 Message-Id: <1407306306-29796-2-git-send-email-ncopa@alpinelinux.org> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1407306306-29796-1-git-send-email-ncopa@alpinelinux.org> References: <1407306306-29796-1-git-send-email-ncopa@alpinelinux.org> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the standard integer types. This fixes compiling errors with musl libc. Signed-off-by: Natanael Copa --- support/include/conffile.h | 2 +- support/nfs/conffile.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/support/include/conffile.h b/support/include/conffile.h index 05ea5d2..94fb005 100644 --- a/support/include/conffile.h +++ b/support/include/conffile.h @@ -49,7 +49,7 @@ struct conf_list { extern char *conf_path; extern int conf_begin(void); -extern int conf_decode_base64(u_int8_t *, u_int32_t *, u_char *); +extern int conf_decode_base64(uint8_t *, uint32_t *, unsigned char *); extern int conf_end(int, int); extern void conf_free_list(struct conf_list *); extern struct sockaddr *conf_get_address(char *, char *); diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c index c3434d5..6b94ec0 100644 --- a/support/nfs/conffile.c +++ b/support/nfs/conffile.c @@ -72,10 +72,10 @@ TAILQ_HEAD (conf_trans_head, conf_trans) conf_trans_queue; /* * Radix-64 Encoding. */ -static const u_int8_t bin2asc[] +static const uint8_t bin2asc[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const u_int8_t asc2bin[] = +static const uint8_t asc2bin[] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, @@ -109,10 +109,10 @@ LIST_HEAD (conf_bindings, conf_binding) conf_bindings[256]; static char *conf_addr; -static __inline__ u_int8_t +static __inline__ uint8_t conf_hash(char *s) { - u_int8_t hash = 0; + uint8_t hash = 0; while (*s) { hash = ((hash << 1) | (hash >> 7)) ^ tolower (*s); @@ -603,10 +603,10 @@ cleanup: /* Decode a PEM encoded buffer. */ int -conf_decode_base64 (u_int8_t *out, u_int32_t *len, u_char *buf) +conf_decode_base64 (uint8_t *out, uint32_t *len, unsigned char *buf) { - u_int32_t c = 0; - u_int8_t c1, c2, c3, c4; + uint32_t c = 0; + uint8_t c1, c2, c3, c4; while (*buf) { if (*buf > 127 || (c1 = asc2bin[*buf]) == 255)