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

Panu Matilainen notifications at github.com
Thu Jun 6 09:25:48 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';

The same pe-p calculation is done several times here with cases and all. Use a helper variable in a case like this.

-- 
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#pullrequestreview-246454941
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190606/05b08f33/attachment-0001.html>


More information about the Rpm-maint mailing list