projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't compute attributes string twice.
[paraslash.git]
/
attribute.c
diff --git
a/attribute.c
b/attribute.c
index 3acbadbebc149733287d49be1774e6363fcf83e4..88b394adc7cf37e764153ddbe53d93607aa1e337 100644
(file)
--- a/
attribute.c
+++ b/
attribute.c
@@
-530,8
+530,10
@@
int get_attribute_text(uint64_t *atts, const char *delim, char **text)
const uint64_t one = 1;
*text = NULL;
const uint64_t one = 1;
*text = NULL;
- if (greatest_att_bitnum < 0) /* no attributes available */
+ if (greatest_att_bitnum < 0) { /* no attributes available */
+ *text = para_strdup("(no attributes available)");
return 1;
return 1;
+ }
for (i = 0; i <= greatest_att_bitnum; i++) {
unsigned char bn = i;
struct osl_object obj = {.data = &bn, .size = 1};
for (i = 0; i <= greatest_att_bitnum; i++) {
unsigned char bn = i;
struct osl_object obj = {.data = &bn, .size = 1};