commit - 655201dd7ad04bde7edbb5968c08d62a99d5fed6
commit + 0005db920da13753451084164884a9b32ebb9f93
blob - 6f5747749d175c80bca3160cdb394aa794025a19
blob + 03cef677989c30438df23619e9eaea3e8be77f21
--- gotd/libexec/got-notify-http/got-notify-http.c
+++ gotd/libexec/got-notify-http/got-notify-http.c
freeaddrinfo(res0);
if (s == -1)
- err(1, "%s", cause);
+ fatal("%s", cause);
return s;
}
author = strdup(l);
if (author == NULL)
- err(1, "strdup");
+ fatal("strdup");
json_author(fp, "author", l, 1);
}
if (author == NULL) /* impossible */
- err(1, "from not specified");
+ fatalx("from not specified");
json_author(fp, "committer", author, 1);
free(author);
author = NULL;
}
}
if (ferror(stdin))
- err(1, "getline");
+ fatalx("getline");
if (!done)
- errx(1, "%s: unexpected EOF", __func__);
+ fatalx("%s: unexpected EOF", __func__);
fputc('}', fp);
return 0;
}
}
if (ferror(stdin))
- err(1, "getline");
+ fatal("getline");
if (!done)
- errx(1, "%s: unexpected EOF", __func__);
+ fatalx("%s: unexpected EOF", __func__);
fputc('}', fp);
return 0;
if (strncmp(line, "Removed refs/heads/", 19) == 0) {
if (jsonify_branch_rm(fp, line, repo) == -1)
- err(1, "jsonify_branch_rm");
+ fatal("jsonify_branch_rm");
continue;
}
if (strncmp(line, "commit ", 7) == 0) {
if (jsonify_commit(fp, repo, &line, &linesize) == -1)
- err(1, "jsonify_commit");
+ fatal("jsonify_commit");
continue;
}
if (*line >= '0' && *line <= '9') {
if (jsonify_commit_short(fp, line, repo) == -1)
- err(1, "jsonify_commit_short");
+ fatal("jsonify_commit_short");
continue;
}
if (strncmp(line, "tag ", 4) == 0) {
if (jsonify_tag(fp, repo, &line, &linesize) == -1)
- err(1, "jsonify_tag");
+ fatal("jsonify_tag");
continue;
}
errx(1, "unexpected line: %s", line);
}
if (ferror(stdin))
- err(1, "getline");
+ fatal("getline");
fprintf(fp, "]}");
return 0;
r = asprintf(&str, "%s:%s", username, password);
if (r == -1)
- err(1, "asprintf");
+ fatal("asprintf");
/*
* Will need 4 * r/3 bytes to encode the string, plus a
tmp = calloc(1, len);
if (tmp == NULL)
- err(1, "malloc");
+ fatal("calloc");
s = str;
p = tmp;