summaryrefslogtreecommitdiff
path: root/catgets
diff options
context:
space:
mode:
Diffstat (limited to 'catgets')
-rw-r--r--catgets/catgetsinfo.h2
-rw-r--r--catgets/open_catalog.c3
-rw-r--r--catgets/tst-catgets.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/catgets/catgetsinfo.h b/catgets/catgetsinfo.h
index 4fdf47aace..5c993f753a 100644
--- a/catgets/catgetsinfo.h
+++ b/catgets/catgetsinfo.h
@@ -48,7 +48,7 @@ typedef struct catalog_info
/* The magic number to signal we really have a catalog file. */
-#define CATGETS_MAGIC 0x960408de
+#define CATGETS_MAGIC 0x960408deU
/* Prototypes for helper functions. */
diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c
index cdcc7b83b8..674a0c1bf0 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -253,8 +253,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
/* Determine whether the file is a catalog file and if yes whether
it is written using the correct byte order. Else we have to swap
the values. */
- if (__builtin_expect (catalog->file_ptr->magic, CATGETS_MAGIC)
- == CATGETS_MAGIC)
+ if (__builtin_expect (catalog->file_ptr->magic == CATGETS_MAGIC, 1))
swapping = 0;
else if (catalog->file_ptr->magic == SWAPU32 (CATGETS_MAGIC))
swapping = 1;
diff --git a/catgets/tst-catgets.c b/catgets/tst-catgets.c
index 249e89f7e0..9936554200 100644
--- a/catgets/tst-catgets.c
+++ b/catgets/tst-catgets.c
@@ -26,7 +26,7 @@ main (void)
for (rnd = 0; rnd < ROUNDS; ++rnd)
{
nl_catd cd = catopen ("libc", 0);
- int cnt;
+ size_t cnt;
if (cd == (nl_catd) -1)
{