]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/cnid/cnid_private.h
Clean up code with astyle.
[netatalk.git] / libatalk / cnid / cnid_private.h
index d60d726bf3dab716bfac988598ad6cfc7b4cd4ce..c8497cd8d5c34c81c4051ad3753d1efbb4516582 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cnid_private.h,v 1.3 2001-08-14 14:00:10 rufustfirefly Exp $
+ * $Id: cnid_private.h,v 1.3.2.1 2001-12-03 05:05:50 jmarcus Exp $
  */
 
 #ifndef LIBATALK_CNID_PRIVATE_H
 #define ROOTINFO_KEYLEN 12
 
 typedef struct CNID_private {
-       u_int32_t magic;
-       DB *db_cnid;
-       DB *db_didname;
-       DB *db_devino;
+    u_int32_t magic;
+    DB *db_cnid;
+    DB *db_didname;
+    DB *db_devino;
 #ifdef EXTENDED_DB
-       DB *db_shortname;
-       DB *db_macname;
-       DB *db_longname;
+    DB *db_shortname;
+    DB *db_macname;
+    DB *db_longname;
 #endif /* EXTENDED_DB */
-       DB_ENV* dbenv;
+    DB_ENV* dbenv;
     int lockfd, flags;
 } CNID_private;
 
@@ -111,27 +111,27 @@ typedef struct CNID_private {
 
 /* construct db_cnid data. NOTE: this is not re-entrant.  */
 static __inline__ char *make_cnid_data(const struct stat *st,
-                                      const cnid_t did, 
-                                      const char *name, const int len)
+                                       const cnid_t did,
+                                       const char *name, const int len)
 {
-  static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
-  char *buf = start;
-  u_int32_t i;
-
-  if (len > MAXPATHLEN)
-    return NULL;
-
-  i = htonl(st->st_dev);
-  buf = memcpy(buf, &i, sizeof(i));
-  i = htonl(st->st_ino);
-  buf = memcpy(buf + sizeof(i), &i, sizeof(i));
-  /* did is already in network byte order */
-  buf = memcpy(buf + sizeof(i), &did, sizeof(did));
-  buf = memcpy(buf + sizeof(did), name, len);
-  *(buf + len) = '\0';
-  buf += len + 1;
-
-  return start;
+    static char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
+    char *buf = start;
+    u_int32_t i;
+
+    if (len > MAXPATHLEN)
+        return NULL;
+
+    i = htonl(st->st_dev);
+    buf = memcpy(buf, &i, sizeof(i));
+    i = htonl(st->st_ino);
+    buf = memcpy(buf + sizeof(i), &i, sizeof(i));
+    /* did is already in network byte order */
+    buf = memcpy(buf + sizeof(i), &did, sizeof(did));
+    buf = memcpy(buf + sizeof(did), name, len);
+    *(buf + len) = '\0';
+    buf += len + 1;
+
+    return start;
 }
 
 #endif /* atalk/cnid/cnid_private.h */