summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-03-14 23:26:37 +0000
committerThomas Schwinge <tschwinge@gnu.org>2006-03-14 23:26:37 +0000
commit1c4b66f7981ec2a77e11fdc94eb5613d32ac1ec4 (patch)
tree669023df4549d38b950c18339c11d61d6a9d4675
parent4201918426b37be6cebfd67e54f020bfb45422fb (diff)
2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
* dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue.
-rw-r--r--ufs/ChangeLog4
-rw-r--r--ufs/dir.h12
2 files changed, 10 insertions, 6 deletions
diff --git a/ufs/ChangeLog b/ufs/ChangeLog
index e2409670..aa30e784 100644
--- a/ufs/ChangeLog
+++ b/ufs/ChangeLog
@@ -1,3 +1,7 @@
+2006-03-15 Thomas Schwinge <tschwinge@gnu.org>
+
+ * dir.h (DIRECT_NAMELEN): Don't use ?: as a lvalue.
+
2002-10-03 Roland McGrath <roland@frob.com>
* dir.h (MAXNAMLEN): #undef before defining.
diff --git a/ufs/dir.h b/ufs/dir.h
index e37b1e9c..5730ef44 100644
--- a/ufs/dir.h
+++ b/ufs/dir.h
@@ -91,13 +91,13 @@ struct directory_entry {
/* Return the namlen from a struct direct, paying attention to whether
this filesystem supports the type extension */
#if (BYTE_ORDER == LITTLE_ENDIAN)
-#define DIRECT_NAMLEN(dp) (direct_symlink_extension || swab_disk \
- ? (dp)->d_namlen \
- : (dp)->d_type)
+#define DIRECT_NAMLEN(dp) (*(direct_symlink_extension || swab_disk \
+ ? &(dp)->d_namlen \
+ : &(dp)->d_type))
#else
-#define DIRECT_NAMLEN(dp) (!direct_symlink_extension && swab_disk \
- ? (dp)->d_type \
- : (dp)->d_namlen)
+#define DIRECT_NAMLEN(dp) (*(!direct_symlink_extension && swab_disk \
+ ? &(dp)->d_type \
+ : &(dp)->d_namlen))
#endif
/*