mirror of
https://github.com/git/git.git
synced 2026-02-07 08:15:23 +00:00
Correct fscanf formatting string for I64u values
Signed-off-by: Waldek Maleska <w.maleska@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
786d05c95e
commit
7cde13530f
@@ -217,7 +217,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
|
||||
* running.
|
||||
*/
|
||||
time(NULL) - st.st_mtime <= 12 * 3600 &&
|
||||
fscanf(fp, "%"PRIuMAX" %127c", &pid, locking_host) == 2 &&
|
||||
fscanf(fp, "%"SCNuMAX" %127c", &pid, locking_host) == 2 &&
|
||||
/* be gentle to concurrent "gc" on remote hosts */
|
||||
(strcmp(locking_host, my_host) || !kill(pid, 0) || errno == EPERM);
|
||||
if (fp != NULL)
|
||||
|
||||
@@ -296,6 +296,10 @@ extern char *gitbasename(char *);
|
||||
#define PRIuMAX "llu"
|
||||
#endif
|
||||
|
||||
#ifndef SCNuMAX
|
||||
#define SCNuMAX PRIuMAX
|
||||
#endif
|
||||
|
||||
#ifndef PRIu32
|
||||
#define PRIu32 "u"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user