diff options
Diffstat (limited to 'lib/uuid')
-rw-r--r-- | lib/uuid/clear.c | 4 | ||||
-rw-r--r-- | lib/uuid/compare.c | 4 | ||||
-rw-r--r-- | lib/uuid/copy.c | 4 | ||||
-rw-r--r-- | lib/uuid/gen_uuid.c | 14 | ||||
-rw-r--r-- | lib/uuid/isnull.c | 4 | ||||
-rw-r--r-- | lib/uuid/pack.c | 6 | ||||
-rw-r--r-- | lib/uuid/parse.c | 6 | ||||
-rw-r--r-- | lib/uuid/tst_uuid.c | 2 | ||||
-rw-r--r-- | lib/uuid/unpack.c | 6 | ||||
-rw-r--r-- | lib/uuid/unparse.c | 8 | ||||
-rw-r--r-- | lib/uuid/uuid.h | 4 | ||||
-rw-r--r-- | lib/uuid/uuidP.h | 4 | ||||
-rw-r--r-- | lib/uuid/uuid_time.c | 14 |
13 files changed, 40 insertions, 40 deletions
diff --git a/lib/uuid/clear.c b/lib/uuid/clear.c index f3a1005b..2d91fee9 100644 --- a/lib/uuid/clear.c +++ b/lib/uuid/clear.c @@ -1,6 +1,6 @@ /* * clear.c -- Clear a UUID - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/compare.c b/lib/uuid/compare.c index a9c505c7..f28a7267 100644 --- a/lib/uuid/compare.c +++ b/lib/uuid/compare.c @@ -2,7 +2,7 @@ * compare.c --- compare whether or not two UUID's are the same * * Returns 0 if the two UUID's are different, and 1 if they are the same. - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -18,7 +18,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/copy.c b/lib/uuid/copy.c index 963bc818..ead33aa2 100644 --- a/lib/uuid/copy.c +++ b/lib/uuid/copy.c @@ -1,6 +1,6 @@ /* * copy.c --- copy UUIDs - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/gen_uuid.c b/lib/uuid/gen_uuid.c index 152a6c09..a3052d4b 100644 --- a/lib/uuid/gen_uuid.c +++ b/lib/uuid/gen_uuid.c @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF @@ -144,7 +144,7 @@ static int get_random_fd(void) fd = open("/dev/random", O_RDONLY | O_NONBLOCK); if (fd >= 0) { i = fcntl(fd, F_GETFD); - if (i >= 0) + if (i >= 0) fcntl(fd, F_SETFD, i | FD_CLOEXEC); } #endif @@ -187,7 +187,7 @@ static void get_random_bytes(void *buf, int nbytes) lose_counter = 0; } } - + /* * We do this all the time, but this is the only source of * randomness if /dev/random/urandom is out to lunch. @@ -199,7 +199,7 @@ static void get_random_bytes(void *buf, int nbytes) jrand_seed[2] = jrand_seed[2] ^ syscall(__NR_gettid); for (cp = buf, i = 0; i < nbytes; i++) *cp++ ^= (jrand48(tmp_seed) >> 7) & 0xFF; - memcpy(jrand_seed, tmp_seed, + memcpy(jrand_seed, tmp_seed, sizeof(jrand_seed)-sizeof(unsigned short)); #endif @@ -230,7 +230,7 @@ static int get_node_id(unsigned char *node_id) /* * BSD 4.4 defines the size of an ifreq to be * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len - * However, under earlier systems, sa_len isn't present, so the size is + * However, under earlier systems, sa_len isn't present, so the size is * just sizeof(struct ifreq) */ #ifdef HAVE_SA_LEN @@ -377,7 +377,7 @@ try_again: adjustment = 0; last = tv; } - + clock_reg = tv.tv_usec*10 + adjustment; clock_reg += ((uint64_t) tv.tv_sec)*10000000; clock_reg += (((uint64_t) 0x01B21DD2) << 32) + 0x13814000; @@ -459,7 +459,7 @@ static int get_uuid_via_daemon(int op, uuid_t out, int *num) access_ret = access(uuidd_path, X_OK); if (access_ret == 0 && start_attempts++ < 5) { if ((pid = fork()) == 0) { - execl(uuidd_path, "uuidd", "-qT", "300", + execl(uuidd_path, "uuidd", "-qT", "300", (char *) NULL); exit(1); } diff --git a/lib/uuid/isnull.c b/lib/uuid/isnull.c index 54a83003..931e7e7d 100644 --- a/lib/uuid/isnull.c +++ b/lib/uuid/isnull.c @@ -1,6 +1,6 @@ /* * isnull.c --- Check whether or not the UUID is null - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/pack.c b/lib/uuid/pack.c index 348d4321..097516d2 100644 --- a/lib/uuid/pack.c +++ b/lib/uuid/pack.c @@ -1,6 +1,6 @@ /* * Internal routine for packing UUID's - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF @@ -48,7 +48,7 @@ void uuid_pack(const struct uuid *uu, uuid_t ptr) out[1] = (unsigned char) tmp; tmp >>= 8; out[0] = (unsigned char) tmp; - + tmp = uu->time_mid; out[5] = (unsigned char) tmp; tmp >>= 8; diff --git a/lib/uuid/parse.c b/lib/uuid/parse.c index 07b894d1..074383ef 100644 --- a/lib/uuid/parse.c +++ b/lib/uuid/parse.c @@ -1,6 +1,6 @@ /* * parse.c --- UUID parsing - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF @@ -73,7 +73,7 @@ int uuid_parse(const char *in, uuid_t uu) buf[1] = *cp++; uuid.node[i] = strtoul(buf, NULL, 16); } - + uuid_pack(&uuid, uu); return 0; } diff --git a/lib/uuid/tst_uuid.c b/lib/uuid/tst_uuid.c index 01606d7c..e03138f7 100644 --- a/lib/uuid/tst_uuid.c +++ b/lib/uuid/tst_uuid.c @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/unpack.c b/lib/uuid/unpack.c index 9502fc2a..beaaff3c 100644 --- a/lib/uuid/unpack.c +++ b/lib/uuid/unpack.c @@ -1,6 +1,6 @@ /* * Internal routine for unpacking UUID - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF @@ -49,7 +49,7 @@ void uuid_unpack(const uuid_t in, struct uuid *uu) tmp = *ptr++; tmp = (tmp << 8) | *ptr++; uu->time_mid = tmp; - + tmp = *ptr++; tmp = (tmp << 8) | *ptr++; uu->time_hi_and_version = tmp; diff --git a/lib/uuid/unparse.c b/lib/uuid/unparse.c index c0e08ef4..a95bbb04 100644 --- a/lib/uuid/unparse.c +++ b/lib/uuid/unparse.c @@ -1,6 +1,6 @@ /* * unparse.c -- convert a UUID to string - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF @@ -36,10 +36,10 @@ #include "uuidP.h" -static const char *fmt_lower = +static const char *fmt_lower = "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"; -static const char *fmt_upper = +static const char *fmt_upper = "%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"; #ifdef UUID_UNPARSE_DEFAULT_UPPER diff --git a/lib/uuid/uuid.h b/lib/uuid/uuid.h index 1c241e3e..ca846da0 100644 --- a/lib/uuid/uuid.h +++ b/lib/uuid/uuid.h @@ -1,6 +1,6 @@ /* * Public include file for the UUID library - * + * * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/uuidP.h b/lib/uuid/uuidP.h index adf233da..d0e24c69 100644 --- a/lib/uuid/uuidP.h +++ b/lib/uuid/uuidP.h @@ -1,6 +1,6 @@ /* * uuid.h -- private header file for uuids - * + * * Copyright (C) 1996, 1997 Theodore Ts'o. * * %Begin-Header% @@ -16,7 +16,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF diff --git a/lib/uuid/uuid_time.c b/lib/uuid/uuid_time.c index fc1d2665..f25f5c90 100644 --- a/lib/uuid/uuid_time.c +++ b/lib/uuid/uuid_time.c @@ -2,7 +2,7 @@ * uuid_time.c --- Interpret the time field from a uuid. This program * violates the UUID abstraction barrier by reaching into the guts * of a UUID and interpreting it. - * + * * Copyright (C) 1998, 1999 Theodore Ts'o. * * %Begin-Header% @@ -18,7 +18,7 @@ * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF @@ -61,7 +61,7 @@ time_t uuid_time(const uuid_t uu, struct timeval *ret_tv) uint64_t clock_reg; uuid_unpack(uu, &uuid); - + high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16); clock_reg = uuid.time_low | ((uint64_t) high << 32); @@ -79,7 +79,7 @@ int uuid_type(const uuid_t uu) { struct uuid uuid; - uuid_unpack(uu, &uuid); + uuid_unpack(uu, &uuid); return ((uuid.time_hi_and_version >> 12) & 0xF); } @@ -88,7 +88,7 @@ int uuid_variant(const uuid_t uu) struct uuid uuid; int var; - uuid_unpack(uu, &uuid); + uuid_unpack(uu, &uuid); var = uuid.clock_seq; if ((var & 0x8000) == 0) @@ -115,7 +115,7 @@ static const char *variant_string(int variant) } } - + int main(int argc, char **argv) { @@ -165,7 +165,7 @@ main(int argc, char **argv) } printf("UUID time is: (%ld, %ld): %s\n", tv.tv_sec, tv.tv_usec, ctime(&time_reg)); - + return 0; } #endif |