]> The Tcpdump Group git mirrors - libpcap/blobdiff - optimize.c
Fix typpo.
[libpcap] / optimize.c
index 30ecec385522fdd92a1a87693835f3916b85afa8..d72cf7a4c6f19d7e920d14919b64630998e572b5 100644 (file)
@@ -60,7 +60,7 @@ int pcap_optimizer_debug;
  *
  * This is the same as the count of trailing zeroes in the word.
  */
-#if PCAP_IS_AT_LEAST_GNUC_VERSION_3_4
+#if PCAP_IS_AT_LEAST_GNUC_VERSION(3,4)
   /*
    * GCC 3.4 and later; we have __builtin_ctz().
    */
@@ -2304,8 +2304,8 @@ install_bpf_program(pcap_t *p, struct bpf_program *fp)
        p->fcode.bf_len = fp->bf_len;
        p->fcode.bf_insns = (struct bpf_insn *)malloc(prog_size);
        if (p->fcode.bf_insns == NULL) {
-               pcap_snprintf(p->errbuf, sizeof(p->errbuf),
-                        "malloc: %s", pcap_strerror(errno));
+               pcap_fmt_errmsg_for_errno(p->errbuf, sizeof(p->errbuf),
+                   errno, "malloc");
                return (-1);
        }
        memcpy(p->fcode.bf_insns, fp->bf_insns, prog_size);