When editing the title of a domain or network via the `desc` or
`net-desc` commands, we strip the final newline that is added by some
editors.
Do the same when editing the description as well.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
return false;
/* strip a possible newline at the end of file; some
- * editors enforce a newline, this makes editing the title
+ * editors enforce a newline, this makes editing
* more convenient */
- if (title &&
- (tmpstr = strrchr(desc_edited, '\n')) &&
+ if ((tmpstr = strrchr(desc_edited, '\n')) &&
*(tmpstr+1) == '\0')
*tmpstr = '\0';
/* strip a possible newline at the end of file; some
* editors enforce a newline, this makes editing the title
* more convenient */
- if (title &&
- (tmpstr = strrchr(desc_edited, '\n')) &&
+ if ((tmpstr = strrchr(desc_edited, '\n')) &&
*(tmpstr+1) == '\0')
*tmpstr = '\0';