aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1parser
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-06-28 21:20:50 +0000
committerLev Walkin <vlm@lionet.info>2004-06-28 21:20:50 +0000
commit4ef7c320b884852ab9d2f1f1fe62b21c109bacea (patch)
treec9b2486bdd81097c04383a76af86b51c82ed1a91 /libasn1parser
parent27ea3808ef29a01fb2a2597008675aff25d29d7b (diff)
comparison with sign
Diffstat (limited to 'libasn1parser')
-rw-r--r--libasn1parser/asn1p_expr_str.h4
-rwxr-xr-xlibasn1parser/expr-h.pl14
2 files changed, 9 insertions, 9 deletions
diff --git a/libasn1parser/asn1p_expr_str.h b/libasn1parser/asn1p_expr_str.h
index 7d98a55c..93567f88 100644
--- a/libasn1parser/asn1p_expr_str.h
+++ b/libasn1parser/asn1p_expr_str.h
@@ -47,8 +47,8 @@ static char *asn1p_expr_type2str[] __attribute__ ((unused)) = {
*/
#define ASN_EXPR_TYPE2STR(type) \
( \
- (((ssize_t)type) < 0 \
- || ((size_t)type) >= sizeof(asn1p_expr_type2str) \
+ (((ssize_t)(type)) < 0 \
+ || ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \
/ sizeof(asn1p_expr_type2str[0])) \
? (char *)0 \
: asn1p_expr_type2str[(type)] \
diff --git a/libasn1parser/expr-h.pl b/libasn1parser/expr-h.pl
index c00128a0..64f68921 100755
--- a/libasn1parser/expr-h.pl
+++ b/libasn1parser/expr-h.pl
@@ -36,13 +36,13 @@ print<<EOM;
/*
* Convert the ASN.1 expression type back into the string representation.
*/
-#define ASN_EXPR_TYPE2STR(type) \\
- ( \\
- ((type) < 0 \\
- || (type) >= sizeof(asn1p_expr_type2str) \\
- / sizeof(asn1p_expr_type2str[0])) \\
- ? (char *)0 \\
- : asn1p_expr_type2str[(type)] \\
+#define ASN_EXPR_TYPE2STR(type) \\
+ ( \\
+ (((ssize_t)(type)) < 0 \\
+ || ((size_t)(type)) >= sizeof(asn1p_expr_type2str) \\
+ / sizeof(asn1p_expr_type2str[0])) \\
+ ? (char *)0 \\
+ : asn1p_expr_type2str[(type)] \\
)
#endif /* ASN1_PARSER_EXPR_STR_H */