Reformat
[yaz-moved-to-github.git] / src / pquery.c
index a0fde12..8db6ac6 100644 (file)
@@ -84,7 +84,7 @@ static int query_token(struct yaz_pqf_parser *li)
     }
     while (**qptr && **qptr != sep_char)
     {
-        if (**qptr == '\\')
+        if (**qptr == '\\' && (*qptr)[1])
         {
             ++(li->lex_len);
             ++(*qptr);
@@ -258,7 +258,7 @@ Z_AttributeList *get_attributeList(ODR o, int num_attr, Odr_int *attr_list,
         return attributes;
     }
     elements = (Z_AttributeElement**)
-        odr_malloc (o, num_attr * sizeof(*elements));
+        odr_malloc(o, num_attr * sizeof(*elements));
 
     attr_tmp = (Odr_int *)odr_malloc(o, num_attr * 2 * sizeof(*attr_tmp));
     memcpy(attr_tmp, attr_list, num_attr * 2 * sizeof(*attr_tmp));