summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-09-13 16:15:04 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-09-13 16:15:04 +0000
commitb1490204442e4ebda035d18c529baed048b6b5f5 (patch)
tree3553a598cbb6b9ad094b3b1d6d5d0c59e710b814
parentd474eef5f19a18f6414b042d127582e249953af1 (diff)
Make it look nice
-rw-r--r--network/manager.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/network/manager.c b/network/manager.c
index 52e7dd6a..7bc56142 100644
--- a/network/manager.c
+++ b/network/manager.c
@@ -264,12 +264,8 @@ static void pan_record_reply(DBusPendingCall *call, void *data)
d = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY);
if (d) {
- if (len)
- snprintf(name + len, MAX_NAME_SIZE - len, " (%.*s)",
- d->unitSize, d->val.str);
- else
- snprintf(name, MAX_NAME_SIZE, "%.*s",
- d->unitSize, d->val.str);
+ snprintf(name + len, MAX_NAME_SIZE - len,
+ len ? " (%.*s)" : "%.*s", d->unitSize, d->val.str);
}
/* Extract service description from record */