X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=perl%2FAmanda%2FApplication.c;h=ce95880ae7e7ba6a6b3646ffafc6bbf9e42c3b8b;hb=fd48f3e498442f0cbff5f3606c7c403d0566150e;hp=91f2daf57d53aa1933f42f938a733591362d0725;hpb=96f35b20267e8b1a1c846d476f27fcd330e0b018;p=debian%2Famanda diff --git a/perl/Amanda/Application.c b/perl/Amanda/Application.c index 91f2daf..ce95880 100644 --- a/perl/Amanda/Application.c +++ b/perl/Amanda/Application.c @@ -1679,7 +1679,9 @@ XS(_wrap_run_calcsize_C) { num = av_len(tempav); for (i=0; i <= num; i++) { tv = av_fetch(tempav, i, 0); - level = g_slist_append(level, GINT_TO_POINTER(SvIV(*tv))); + /* (gint) cast is required because sizeof(IV) may not be sizeof(gint). + * Both will be >= 32 bits, though, and that's sufficient for a level. */ + level = g_slist_append(level, GINT_TO_POINTER((gint)SvIV(*tv))); } arg5 = level; }