summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2010-05-12 19:34:31 +0200
committerJohannes Weiner <hannes@cmpxchg.org>2010-05-12 19:34:31 +0200
commitf692322b86e0f3ed4294d9989b28b92686989767 (patch)
tree8155518ca6a364dbbbd769eecd428c7e65073f36
parent8089e5c69c120b85e96089e77d3451d169997fdc (diff)
alien: print plain alien name in !repr mode
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
-rw-r--r--sheep/alien.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sheep/alien.c b/sheep/alien.c
index 869c1c8..4b47a82 100644
--- a/sheep/alien.c
+++ b/sheep/alien.c
@@ -34,10 +34,10 @@ static void alien_format(sheep_t sheep, struct sheep_strbuf *sb, int repr)
struct sheep_alien *alien;
alien = sheep_data(sheep);
- if (alien->name)
+ if (repr)
sheep_strbuf_addf(sb, "#<alien '%s'>", alien->name);
else
- sheep_strbuf_addf(sb, "#<alien '%p'>", alien);
+ sheep_strbuf_add(sb, alien->name);
}
const struct sheep_type sheep_alien_type = {