Simplify formatting
authorJindrich Novy <jnovy@redhat.com>
Fri, 4 Apr 2008 11:17:53 +0000 (13:17 +0200)
committerJindrich Novy <jnovy@redhat.com>
Fri, 4 Apr 2008 11:17:53 +0000 (13:17 +0200)
build/spec.c

index 610a284..3089f4d 100644 (file)
@@ -623,8 +623,8 @@ printNewSpecfile(rpmSpec spec)
            sl->sl_lines[t->t_startx] = _free(sl->sl_lines[t->t_startx]);
            if (t->t_lang && strcmp(t->t_lang, RPMBUILD_DEFAULT_LANG))
                continue;
-           {   char *buf = xmalloc(strlen(tn) + sizeof(": ") + strlen(msgstr));
-               (void) stpcpy( stpcpy( stpcpy(buf, tn), ": "), msgstr);
+           {   char *buf = NULL;
+               rasprintf(&buf, "%s: %s", tn, msgstr);
                sl->sl_lines[t->t_startx] = buf;
            }
            break;