[Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

Panu Matilainen notifications at github.com
Thu Jun 6 09:28:29 UTC 2019


pmatilai commented on this pull request.



> @@ -130,8 +130,7 @@ static int dateToTimet(const char * datestr, time_t * secs, int * date_words)
 	SKIPNONSPACE(pe);
 	if (*pe != '\0')
 	   *pe++ = '\0';
-	if (((int)(pe-p) + 1) > 9 )
-	   goto exit;
+	tz_name = xmalloc((int)(pe-p)+1);
 	strncpy(tz_name, p, (int)(pe-p));
 	tz_name[(int)(pe-p)] = '\0';

Oh and the casts are unnecessary here anyway. Never cast unless you really, really have to, and even then there's usually a better way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/739#discussion_r291095629
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190606/77dcb571/attachment.html>


More information about the Rpm-maint mailing list