commit - 8aebbd0a7057d6129ac03dd30732374167048488
commit + b3fabc965e73df1255fb6fe1c1ca6d3452a6264e
blob - 355860a4ba48913006fd6f5b8ea81ed2d3ab94b5
blob + 67a9f9676ed29a79b0958dbcc5feedfe5137eec0
--- 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;