From: Yu Watanabe Date: Mon, 27 Aug 2018 04:48:04 +0000 (+0900) Subject: tree-wide: use unsigned for refcount X-Git-Tag: v240~791^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf4b2f9906c596b9e0d5f2ae8fbdc9f4e4bc2864;p=thirdparty%2Fsystemd.git tree-wide: use unsigned for refcount --- diff --git a/src/core/dynamic-user.h b/src/core/dynamic-user.h index 791a8ba0efd..112f91e63a0 100644 --- a/src/core/dynamic-user.h +++ b/src/core/dynamic-user.h @@ -15,7 +15,7 @@ typedef struct DynamicCreds { * used. This means, if you want to allocate a group and user pair, and they might have two different names, then you * need to allocated two of these objects. DynamicCreds below makes that easy. */ struct DynamicUser { - int n_ref; + unsigned n_ref; Manager *manager; /* An AF_UNIX socket pair that contains a datagram containing both the numeric ID assigned, as well as a lock diff --git a/src/core/execute.h b/src/core/execute.h index 2e8b01f7695..03a36e608cd 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -107,7 +107,7 @@ struct ExecCommand { * between invocations of commands. This is a reference counted object, with one reference taken by each currently * active command invocation that wants to share this runtime. */ struct ExecRuntime { - int n_ref; + unsigned n_ref; Manager *manager; diff --git a/src/journal-remote/journal-remote-write.h b/src/journal-remote/journal-remote-write.h index 7ed32aa5aa8..9f3df423d86 100644 --- a/src/journal-remote/journal-remote-write.h +++ b/src/journal-remote/journal-remote-write.h @@ -16,7 +16,7 @@ typedef struct Writer { uint64_t seqnum; - int n_ref; + unsigned n_ref; } Writer; Writer* writer_new(RemoteServer* server); diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c index 2366055f0ac..442c994b9fc 100644 --- a/src/journal/mmap-cache.c +++ b/src/journal/mmap-cache.c @@ -53,7 +53,7 @@ struct MMapFileDescriptor { }; struct MMapCache { - int n_ref; + unsigned n_ref; unsigned n_windows; unsigned n_hit, n_missed; diff --git a/src/libsystemd/sd-device/device-internal.h b/src/libsystemd/sd-device/device-internal.h index 996008bf6de..39e984cf7cf 100644 --- a/src/libsystemd/sd-device/device-internal.h +++ b/src/libsystemd/sd-device/device-internal.h @@ -7,7 +7,7 @@ #include "set.h" struct sd_device { - uint64_t n_ref; + unsigned n_ref; sd_device *parent; bool parent_set; /* no need to try to reload parent */ diff --git a/src/network/netdev/netdev.h b/src/network/netdev/netdev.h index d073216b148..2746de01a07 100644 --- a/src/network/netdev/netdev.h +++ b/src/network/netdev/netdev.h @@ -72,7 +72,7 @@ typedef struct Condition Condition; typedef struct NetDev { Manager *manager; - int n_ref; + unsigned n_ref; char *filename; diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h index 912952e651c..dcf722a63dc 100644 --- a/src/network/networkd-link.h +++ b/src/network/networkd-link.h @@ -49,7 +49,7 @@ typedef struct DUID DUID; typedef struct Link { Manager *manager; - int n_ref; + unsigned n_ref; int ifindex; char *ifname; diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h index d616c329938..5ebaff33d71 100644 --- a/src/resolve/resolved-dns-packet.h +++ b/src/resolve/resolved-dns-packet.h @@ -53,7 +53,7 @@ struct DnsPacketHeader { #define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096u struct DnsPacket { - int n_ref; + unsigned n_ref; DnsProtocol protocol; size_t size, allocated, rindex, max_size; void *_data; /* don't access directly, use DNS_PACKET_DATA()! */ diff --git a/src/resolve/resolved-dns-stream.h b/src/resolve/resolved-dns-stream.h index 72db2a1a56a..46d2704afef 100644 --- a/src/resolve/resolved-dns-stream.h +++ b/src/resolve/resolved-dns-stream.h @@ -23,7 +23,7 @@ typedef struct DnsStream DnsStream; struct DnsStream { Manager *manager; - int n_ref; + unsigned n_ref; DnsProtocol protocol;