media/libyuv/cpu_id.patch
author Nils Ohlmeier [:drno] <drno@ohlmeier.org>
Mon, 18 Dec 2017 20:30:05 -0800
changeset 448625 dc853f9fd97293ff703530d806ebf2633740ed69
parent 391911 f29dad38621ed4462b4416ffa090d25e9c017cde
permissions -rw-r--r--
Bug 1426059: removed transportlayerprsock code. r=bwc MozReview-Commit-ID: IWcpxq1Z2V9

diff --git a/media/libyuv/libyuv/source/cpu_id.cc b/media/libyuv/libyuv/source/cpu_id.cc
--- a/media/libyuv/libyuv/source/cpu_id.cc
+++ b/media/libyuv/libyuv/source/cpu_id.cc
@@ -172,28 +172,30 @@ LIBYUV_API SAFEBUFFERS int MipsCpuCaps(c
   if (!f) {
     // ase enabled if /proc/cpuinfo is unavailable.
     if (strcmp(ase, " msa") == 0) {
       return kCpuHasMSA;
     }
     if (strcmp(ase, " dspr2") == 0) {
       return kCpuHasDSPR2;
     }
+    return 0;
   }
   while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f)) {
     if (memcmp(cpuinfo_line, "ASEs implemented", 16) == 0) {
       char* p = strstr(cpuinfo_line, ase);
       if (p && (p[len] == ' ' || p[len] == '\n')) {
         fclose(f);
         if (strcmp(ase, " msa") == 0) {
           return kCpuHasMSA;
         }
         if (strcmp(ase, " dspr2") == 0) {
           return kCpuHasDSPR2;
         }
+        return 0;
       }
     }
   }
   fclose(f);
   return 0;
 }
 
 // CPU detect function for SIMD instruction sets.