]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Reduce dependencies of k5-input.h
authorGreg Hudson <ghudson@mit.edu>
Tue, 18 Apr 2017 16:33:48 +0000 (12:33 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 18 Apr 2017 16:33:48 +0000 (12:33 -0400)
Avoid using the krb5_error_code type (using int32_t instead), and
include k5-platform.h instead of k5-int.h, so that we can use
k5-input.h in libkrb5support.

src/include/k5-input.h
src/lib/krb5/ccache/ccmarshal.c

index d42ebce8f271e13766e49a34bc893336181647fe..9f47fa7ab903afd64a368c9d05b3cb98947c4e43 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef K5_INPUT_H
 #define K5_INPUT_H
 
-#include "k5-int.h"
+#include "k5-platform.h"
 
 /*
  * The k5input module defines helpers for safely consuming a fixed-sized block
@@ -45,7 +45,7 @@
 struct k5input {
     const unsigned char *ptr;
     size_t len;
-    krb5_error_code status;
+    int32_t status;
 };
 
 static inline void
@@ -59,7 +59,7 @@ k5_input_init(struct k5input *in, const void *ptr, size_t len)
 /* Only set the status value of in if it hasn't already been set, so status
  * reflects the first thing to go wrong. */
 static inline void
-k5_input_set_status(struct k5input *in, krb5_error_code status)
+k5_input_set_status(struct k5input *in, int32_t status)
 {
     if (!in->status)
         in->status = status;
index bd6d309d1d4e2d445eef45ca947b55c6855b5410..ae634ccab0d22c47ac7cfb6fceec6f702ed8eacd 100644 (file)
  * second value when reading it.
  */
 
-#include "k5-input.h"
 #include "cc-int.h"
+#include "k5-input.h"
 
 /* Read a 16-bit integer in host byte order for versions 1 and 2, or in
  * big-endian byte order for later versions.*/